CI (Game Test Results) #35
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: CI (Game Test Results) | |
| on: | |
| workflow_run: | |
| workflows: ["CI (Game Tests)"] | |
| types: | |
| - completed | |
| jobs: | |
| comment: | |
| runs-on: ubuntu-latest | |
| if: github.event.workflow_run.event == 'pull_request' | |
| permissions: | |
| pull-requests: write | |
| actions: read | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v5 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: '20.x' | |
| - name: Install dependencies | |
| run: npm i --omit=dev | |
| working-directory: .github/scripts | |
| - name: Download test logs | |
| uses: actions/download-artifact@v6 | |
| with: | |
| name: game-test-logs | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| run-id: ${{ github.event.workflow_run.id }} | |
| - name: Comment PR with test results | |
| uses: actions/github-script@v8 | |
| with: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| script: | | |
| const script = require('./.github/scripts/gametestresults.js') | |
| await script({github, context}) |