chore(ci): set up CI tests #9
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: Test | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| permissions: | |
| pull-requests: write | |
| contents: read | |
| jobs: | |
| tests: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 5 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| lfs: true | |
| - name: Fetch and checkout LFS objects | |
| run: | | |
| git lfs fetch --all | |
| git lfs checkout | |
| - uses: jdx/mise-action@v3 | |
| with: | |
| install: true | |
| - name: Install deps | |
| run: mise run install | |
| - name: Run post-commit | |
| run: mise run post-commit | |
| - name: Unit tests | |
| run: mise run test_unit | |
| - name: End to end tests | |
| run: mise run test_e2e | |
| - name: Create coverage artifact | |
| run: mise run coverage | |
| - name: Generate code coverage report | |
| uses: irongut/[email protected] | |
| with: | |
| filename: coverage.xml | |
| badge: false | |
| fail_below_min: false | |
| format: markdown | |
| hide_branch_rate: false | |
| hide_complexity: true | |
| indicators: true | |
| output: both | |
| - name: Add Coverage PR Comment | |
| uses: marocchino/sticky-pull-request-comment@v2 | |
| if: github.event_name == 'pull_request' | |
| with: | |
| recreate: true | |
| path: code-coverage-results.md |