Skip to content

14 report viewer crashes when one of the many added reports is deleted #8

14 report viewer crashes when one of the many added reports is deleted

14 report viewer crashes when one of the many added reports is deleted #8

Workflow file for this run

name: Run Tests On Comment
on:
workflow_dispatch:
issue_comment:
types: [created]
permissions:
issues: write
pull-requests: write
jobs:
run-tests:
if: |
github.event.issue.pull_request &&
contains(github.event.comment.body, 'run tests') &&
(
github.event.comment.author_association == 'OWNER' ||
github.event.comment.author_association == 'MEMBER' ||
github.event.comment.author_association == 'COLLABORATOR'
)
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18, 20]
steps:
- name: Checkout PR branch
uses: actions/checkout@v4
with:
ref: refs/pull/${{ github.event.issue.number }}/head
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Install dependencies
run: npm install
- name: Run TypeScript check
run: npm run lint
- name: Run tests
run: npm test
- name: Comment PR with success
if: success()
uses: actions/github-script@v7
with:
script: |
const runUrl = `${process.env.GITHUB_SERVER_URL}/${process.env.GITHUB_REPOSITORY}/actions/runs/${process.env.GITHUB_RUN_ID}`;
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: `✅ Tests passed successfully!\n\nView the logs: ${runUrl}`
})
- name: Comment PR with failure
if: failure()
uses: actions/github-script@v7
with:
script: |
const runUrl = `${process.env.GITHUB_SERVER_URL}/${process.env.GITHUB_REPOSITORY}/actions/runs/${process.env.GITHUB_RUN_ID}`;
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: `❌ Tests failed.\n\nView the logs: ${runUrl}`
})
- name: Build extension
run: npm run build