Merge pull request #65 from sirkirby/queue_updates #46
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: Test Suite | |
| on: | |
| push: | |
| branches: [ main, dev ] | |
| pull_request: | |
| branches: [ main, dev ] | |
| permissions: | |
| contents: read | |
| checks: write | |
| pull-requests: write | |
| statuses: write | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.13.0' | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r requirements.txt | |
| - name: Run tests | |
| run: | | |
| pytest | |
| - name: Report Status | |
| if: always() | |
| uses: actions/github-script@v7 | |
| with: | |
| script: | | |
| const conclusion = '${{ job.status }}'.toLowerCase(); | |
| await github.rest.repos.createCommitStatus({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| sha: context.sha, | |
| state: conclusion === 'success' ? 'success' : 'failure', | |
| description: conclusion === 'success' ? 'All tests passed!' : 'Some tests failed.', | |
| context: 'Test Suite' | |
| }); |