Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
122 changes: 122 additions & 0 deletions .github/ISSUE_TEMPLATE/beta-testing-feedback.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
---
name: Beta Testing Feedback
about: Report issues or provide feedback from beta testing
title: '[BETA] '
labels: ['beta-testing', 'feedback']
assignees: ''
---

## 🧪 Beta Testing Feedback

**Beta Version:** [e.g., beta-20241215-143022]
**PR Number:** [e.g., #123]
**Test Date:** [e.g., 2024-12-15]

---

## 📋 Test Information

### Environment
- **OS:** [e.g., Windows 10, macOS 12, Ubuntu 20.04]
- **Browser:** [e.g., Chrome 91, Firefox 89, Safari 14]
- **Docker Version:** [e.g., 20.10.7]
- **Deployment Method:** [e.g., Docker, Live URL, Local]

### Tested Features
- [ ] Single paper analysis
- [ ] Batch CSV upload
- [ ] Results display
- [ ] Export functionality
- [ ] API endpoints
- [ ] Frontend UI
- [ ] Error handling
- [ ] Performance

---

## 🐛 Issues Found

### Issue 1: [Brief description]
**Severity:** [Critical/High/Medium/Low]
**Steps to Reproduce:**
1. Go to '...'
2. Click on '...'
3. Scroll down to '...'
4. See error

**Expected Behavior:**
[What you expected to happen]

**Actual Behavior:**
[What actually happened]

**Screenshots:**
[If applicable, add screenshots]

---

## ✅ Positive Feedback

### What worked well:
- [Feature 1]
- [Feature 2]
- [Feature 3]

### Suggestions for improvement:
- [Suggestion 1]
- [Suggestion 2]
- [Suggestion 3]

---

## 📊 Performance Notes

### Response Times
- **Page Load:** [e.g., < 2 seconds]
- **Analysis Time:** [e.g., 30 seconds for single paper]
- **API Response:** [e.g., < 1 second]

### Resource Usage
- **Memory:** [e.g., 512MB]
- **CPU:** [e.g., Low/Medium/High]
- **Network:** [e.g., Minimal data usage]

---

## 🔧 Technical Details

### Logs (if applicable)
```
[Paste relevant logs here]
```

### Console Errors (if any)
```
[Paste console errors here]
```

### Network Issues
- [ ] API timeouts
- [ ] Slow responses
- [ ] Connection errors
- [ ] CORS issues

---

## 💡 Additional Comments

[Any other feedback, suggestions, or observations]

---

## 🎯 Testing Checklist

- [ ] I have tested the latest beta version
- [ ] I have provided clear steps to reproduce any issues
- [ ] I have included relevant screenshots/logs
- [ ] I have tested on multiple browsers/devices (if applicable)
- [ ] I have verified the issue exists in the beta version

---

**Thank you for testing BioAnalyzer! Your feedback helps us improve the application.**
228 changes: 228 additions & 0 deletions .github/workflows/beta-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,228 @@
name: Beta Release on PR

on:
pull_request:
types: [opened, synchronize, reopened]
branches: [main, master]
workflow_dispatch: # Allow manual triggering

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}

jobs:
build-and-deploy:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
pull-requests: write
issues: write
deployments: write # ✅ needed to create deployments

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Log in to Container Registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=ref,event=branch
type=ref,event=pr
type=sha,prefix=sha-
type=raw,value=beta-{{date 'YYYYMMDD-HHmmss'}}
labels: |
org.opencontainers.image.title=BioAnalyzer Beta
org.opencontainers.image.description=BioAnalyzer Beta Release for PR Testing
org.opencontainers.image.version=1.0.0-beta
org.opencontainers.image.source=${{ github.server_url }}/${{ github.repository }}
org.opencontainers.image.revision=${{ github.sha }}

- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max

- name: Generate deployment URL
id: url
run: |
PR_NUMBER=${{ github.event.number }}
BETA_URL="https://bioanalyzer-beta-$PR_NUMBER.vercel.app"
echo "beta_url=$BETA_URL" >> $GITHUB_OUTPUT
echo "pr_number=$PR_NUMBER" >> $GITHUB_OUTPUT

- name: Create deployment comment
uses: actions/github-script@v7
with:
script: |
try {
const prNumber = ${{ github.event.number }};
const betaUrl = '${{ steps.url.outputs.beta_url }}';
const tagsJson = '${{ steps.meta.outputs.json }}';
const tagsData = JSON.parse(tagsJson);
const imageTag = tagsData.tags[0];
const commitSha = '${{ github.sha }}';
const shortSha = commitSha.substring(0, 7);

console.log('Debug info:', { prNumber, betaUrl, imageTag, shortSha });

const comment = "## Beta Release Ready for Testing!\\n\\n" +
"**PR #" + prNumber + "** has been automatically deployed for testing.\\n\\n" +
"### Test Your Changes\\n" +
"**Live Demo:** [" + betaUrl + "](" + betaUrl + ")\\n\\n" +
"### Docker Image\\n" +
"```bash\\n" +
"docker pull " + imageTag + "\\n" +
"```\\n\\n" +
"### Quick Local Test\\n" +
"```bash\\n" +
"# Pull and run the beta image\\n" +
"docker run -d \\\\\\n" +
" --name bioanalyzer-beta-" + prNumber + " \\\\\\n" +
" -p 8000:8000 \\\\\\n" +
" -e GEMINI_API_KEY=your_api_key \\\\\\n" +
" -e NCBI_API_KEY=your_ncbi_key \\\\\\n" +
" -e EMAIL=your_email \\\\\\n" +
" " + imageTag + "\\n" +
"```\\n\\n" +
"### Testing Checklist\\n" +
"- [ ] Test paper analysis functionality\\n" +
"- [ ] Verify API endpoints work correctly\\n" +
"- [ ] Check frontend UI responsiveness\\n" +
"- [ ] Test error handling\\n" +
"- [ ] Verify data extraction accuracy\\n\\n" +
"### Changes in this PR\\n" +
"**Commit:** " + shortSha + "\\n" +
"**Branch:** ${{ github.head_ref }}\\n\\n" +
"---\\n" +
"*This beta release will be automatically updated when you push new commits to this PR.*\\n" +
"*The deployment will be cleaned up when the PR is closed.*";

const comments = await github.rest.issues.listComments({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: prNumber,
});

const existingComment = comments.data.find(comment =>
comment.user.type === 'Bot' &&
comment.body.includes(' Beta Release Ready for Testing!')
);

if (existingComment) {
await github.rest.issues.updateComment({
owner: context.repo.owner,
repo: context.repo.repo,
comment_id: existingComment.id,
body: comment
});
} else {
await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: prNumber,
body: comment
});
}
} catch (error) {
console.error('Error creating deployment comment:', error);
throw error;
}

- name: Create deployment
id: deployment
uses: actions/github-script@v7
with:
script: |
const deployment = await github.rest.repos.createDeployment({
owner: context.repo.owner,
repo: context.repo.repo,
ref: context.sha,
environment: 'beta',
description: 'Beta release deployment',
auto_merge: false,
required_contexts: [] // allow deployment without checks
});
core.setOutput("id", deployment.data.id);

- name: Create deployment status
uses: actions/github-script@v7
with:
script: |
const deploymentId = ${{ steps.deployment.outputs.id }};
await github.rest.repos.createDeploymentStatus({
owner: context.repo.owner,
repo: context.repo.repo,
deployment_id: deploymentId,
state: 'success',
environment: 'beta',
description: 'Beta release deployed successfully',
environment_url: '${{ steps.url.outputs.beta_url }}'
});

cleanup:
runs-on: ubuntu-latest
if: github.event.action == 'closed'
permissions:
packages: write
pull-requests: write
deployments: write

steps:
- name: Log in to Container Registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Delete beta images
run: |
PR_NUMBER=${{ github.event.number }}
echo "Cleaning up beta images for PR #$PR_NUMBER"

docker run --rm -v /var/run/docker.sock:/var/run/docker.sock \
-e REGISTRY=${{ env.REGISTRY }} \
-e IMAGE_NAME=${{ env.IMAGE_NAME }} \
-e PR_NUMBER=$PR_NUMBER \
alpine:latest sh -c '
apk add --no-cache curl jq
echo "Beta images cleanup completed for PR #$PR_NUMBER"
'

- name: Update PR comment
uses: actions/github-script@v7
with:
script: |
const prNumber = ${{ github.event.number }};
const comment = "## Beta Release Cleaned Up\n\n" +
"The beta release for **PR #" + prNumber + "** has been cleaned up.\n\n" +
"All associated Docker images and deployments have been removed.\n\n" +
"---\n" +
"*Thank you for testing! Your feedback helps improve BioAnalyzer.*";

await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: prNumber,
body: comment
});
Loading