Bump Microsoft.AspNetCore.Identity.EntityFrameworkCore from 9.0.15 to 9.0.16 #22
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Bug Reproduction Video | |
| on: | |
| pull_request: | |
| types: | |
| - labeled | |
| workflow_dispatch: | |
| inputs: | |
| issue_number: | |
| description: Issue or PR number to reproduce against | |
| required: true | |
| type: number | |
| require_bug_label: | |
| description: Fail run if target does not have bug label | |
| required: true | |
| default: true | |
| type: boolean | |
| target_ref: | |
| description: Git ref to checkout when issue_number is not a PR | |
| required: false | |
| default: main | |
| type: string | |
| permissions: | |
| contents: read | |
| issues: write | |
| actions: read | |
| pull-requests: read | |
| env: | |
| DOTNET_VERSION: 10.0.x | |
| # Set one or both. | |
| SOLUTION_FILE: DevBetterWeb.slnx | |
| PROJECT_FILE: src/DevBetterWeb.Web/DevBetterWeb.Web.csproj | |
| APP_URL: http://127.0.0.1:5010 | |
| APP_STARTUP_COMMAND: dotnet run --project src/DevBetterWeb.Web/DevBetterWeb.Web.csproj --no-build --launch-profile "DevBetterWeb.Web - DEV" | |
| jobs: | |
| reproduce-bug: | |
| if: > | |
| (github.event_name == 'pull_request' && github.event.label.name == 'bug') || | |
| github.event_name == 'workflow_dispatch' | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| concurrency: | |
| group: repro-bug-${{ github.event_name }}-${{ github.event.pull_request.number || github.event.inputs.issue_number || github.run_id }} | |
| cancel-in-progress: true | |
| steps: | |
| - name: Resolve target context | |
| id: target | |
| uses: actions/github-script@v7 | |
| with: | |
| script: | | |
| const isDispatch = context.eventName === 'workflow_dispatch'; | |
| const inputs = context.payload.inputs || {}; | |
| let issueNumber; | |
| let issueTitle; | |
| let issueBody; | |
| let issueUrl; | |
| let checkoutRef = context.ref; | |
| let labels = []; | |
| if (isDispatch) { | |
| issueNumber = Number(inputs.issue_number); | |
| if (!Number.isFinite(issueNumber) || issueNumber <= 0) { | |
| core.setFailed('workflow_dispatch requires a valid issue_number input.'); | |
| return; | |
| } | |
| const issueResponse = await github.rest.issues.get({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| issue_number: issueNumber | |
| }); | |
| const issue = issueResponse.data; | |
| issueTitle = issue.title || ''; | |
| issueBody = issue.body || ''; | |
| issueUrl = issue.html_url; | |
| labels = (issue.labels || []) | |
| .map((label) => typeof label === 'string' ? label : label.name) | |
| .filter(Boolean); | |
| if (issue.pull_request) { | |
| const prResponse = await github.rest.pulls.get({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| pull_number: issueNumber | |
| }); | |
| checkoutRef = prResponse.data.head.sha; | |
| } else { | |
| checkoutRef = inputs.target_ref || 'main'; | |
| } | |
| const requireBugLabel = String(inputs.require_bug_label).toLowerCase() === 'true'; | |
| if (requireBugLabel && !labels.includes('bug')) { | |
| core.setFailed(`Issue/PR #${issueNumber} is missing bug label.`); | |
| return; | |
| } | |
| } else { | |
| const pr = context.payload.pull_request; | |
| issueNumber = pr.number; | |
| issueTitle = pr.title || ''; | |
| issueBody = pr.body || ''; | |
| issueUrl = pr.html_url; | |
| checkoutRef = pr.head.sha; | |
| labels = (pr.labels || []).map((label) => label.name).filter(Boolean); | |
| if (!labels.includes('bug')) { | |
| core.setFailed(`PR #${issueNumber} is missing bug label.`); | |
| return; | |
| } | |
| } | |
| core.exportVariable('ISSUE_NUMBER', String(issueNumber)); | |
| core.exportVariable('ISSUE_TITLE', issueTitle); | |
| core.exportVariable('ISSUE_BODY', issueBody); | |
| core.exportVariable('ISSUE_URL', issueUrl); | |
| core.exportVariable('REPO_NAME', context.repo.owner + '/' + context.repo.repo); | |
| core.setOutput('checkout_ref', checkoutRef); | |
| core.setOutput('issue_number', String(issueNumber)); | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| ref: ${{ steps.target.outputs.checkout_ref }} | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: ${{ env.DOTNET_VERSION }} | |
| - name: Initialize Playwright project | |
| run: | | |
| npm init -y | |
| npm install @playwright/test wait-on | |
| npx playwright install --with-deps | |
| - name: Restore .NET dependencies | |
| run: | | |
| if [ -n "${SOLUTION_FILE}" ] && [ -f "${SOLUTION_FILE}" ]; then | |
| dotnet restore "${SOLUTION_FILE}" | |
| elif [ -n "${PROJECT_FILE}" ] && [ -f "${PROJECT_FILE}" ]; then | |
| dotnet restore "${PROJECT_FILE}" | |
| else | |
| dotnet restore | |
| fi | |
| - name: Build application | |
| run: | | |
| if [ -n "${SOLUTION_FILE}" ] && [ -f "${SOLUTION_FILE}" ]; then | |
| dotnet build "${SOLUTION_FILE}" --no-restore | |
| elif [ -n "${PROJECT_FILE}" ] && [ -f "${PROJECT_FILE}" ]; then | |
| dotnet build "${PROJECT_FILE}" --no-restore | |
| else | |
| dotnet build --no-restore | |
| fi | |
| - name: Start application | |
| run: | | |
| ${APP_STARTUP_COMMAND} > app.log 2>&1 & | |
| echo $! > app.pid | |
| - name: Wait for application startup | |
| run: | | |
| npx wait-on "${APP_URL}" --timeout 120000 | |
| - name: Generate reproduction script | |
| run: | | |
| mkdir -p tests | |
| cat << 'EOF' > tests/repro.spec.js | |
| const { test } = require('@playwright/test'); | |
| test.use({ | |
| video: 'on', | |
| trace: 'on', | |
| screenshot: 'only-on-failure' | |
| }); | |
| test('attempt reproduction from github pull request', async ({ page }) => { | |
| await page.goto(process.env.APP_URL, { | |
| waitUntil: 'networkidle' | |
| }); | |
| await page.waitForTimeout(5000); | |
| console.log('Issue Title:'); | |
| console.log(process.env.ISSUE_TITLE); | |
| console.log('Issue Body:'); | |
| console.log(process.env.ISSUE_BODY); | |
| }); | |
| EOF | |
| - name: Run Playwright reproduction | |
| run: | | |
| npx playwright test --reporter=list | |
| - name: Upload Playwright artifacts | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: repro-artifacts-${{ steps.target.outputs.issue_number }} | |
| path: | | |
| app.log | |
| test-results | |
| playwright-report | |
| if-no-files-found: warn | |
| retention-days: 14 | |
| - name: Comment on issue or PR with artifact link | |
| if: always() | |
| uses: actions/github-script@v7 | |
| with: | |
| script: | | |
| const runUrl = | |
| `https://github.com/${context.repo.owner}/${context.repo.repo}` + | |
| `/actions/runs/${context.runId}`; | |
| const body = ` | |
| 🤖 Automated reproduction attempt completed. | |
| ## Target | |
| #${process.env.ISSUE_NUMBER} | |
| ## Configuration | |
| - Solution: \`${process.env.SOLUTION_FILE || '(not set)'}\` | |
| - Project: \`${process.env.PROJECT_FILE || '(not set)'}\` | |
| - App URL: \`${process.env.APP_URL}\` | |
| ## Artifacts | |
| - 🎥 Playwright video | |
| - 📷 Screenshots | |
| - 🧭 Trace files | |
| - 📄 Console output | |
| Download artifacts from the workflow run: | |
| ${runUrl} | |
| `; | |
| await github.rest.issues.createComment({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| issue_number: Number(process.env.ISSUE_NUMBER), | |
| body | |
| }); | |
| - name: Cleanup app | |
| if: always() | |
| run: | | |
| if [ -f app.pid ]; then | |
| kill $(cat app.pid) || true | |
| fi |