Skip to content

chore(e2e): create test for submitting a final round answer and getting points value #45

chore(e2e): create test for submitting a final round answer and getting points value

chore(e2e): create test for submitting a final round answer and getting points value #45

Workflow file for this run

name: Lint & E2E Checks
on:
workflow_dispatch:
issue_comment:
types: [created]
env:
docker_registry: ghcr.io/joshzcold
game_store: memory
jobs:
check-comment:
name: Check for Maintainer Comment
runs-on: ubuntu-latest
outputs:
should_run: ${{ steps.find-comment.outputs.comment-id != '' }}
steps:
- name: Find "!test" Comment by Maintainers
id: find-comment
uses: peter-evans/find-comment@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
issue-number: ${{ github.event.issue.number }}
comment-author: joshzcold
body-includes: "!test"
- name: Set should_run to true for manual dispatch
id: set-run
if: ${{ github.event_name == 'workflow_dispatch' }}
run: echo "should_run=true" >> $GITHUB_OUTPUT
- name: Set should_run based on comment
if: ${{ github.event_name == 'issue_comment' }}
run: echo "should_run=${{ steps.find-comment.outputs.comment-id != '' }}" >> $GITHUB_OUTPUT
lint:
name: Lint Check
runs-on: ubuntu-latest
needs: [check-comment]
if: ${{ github.event_name == 'workflow_dispatch' || needs.check-comment.outputs.should_run == 'true' }}
steps:
- uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: "20"
cache: "npm"
- name: Install dependencies
run: npm ci
- name: Run lint
run: npm run lint
test:
name: E2E Tests
needs: [lint, check-comment]
if: ${{ github.event_name == 'workflow_dispatch' || needs.check-comment.outputs.should_run == 'true' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: "20"
cache: "npm"
- name: Install dependencies
run: |
npm ci
cd e2e
npm ci
- name: Install Playwright browsers
run: |
cd e2e
npx playwright install --with-deps
- name: Run e2e tests
run: |
make e2e