Skip to content

chore(ci): set up CI tests #4

chore(ci): set up CI tests

chore(ci): set up CI tests #4

Workflow file for this run

---
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 pre-commit
run: mise run pre-commit
- name: Format
run: |
mise run fmt
git diff --exit-code || (echo "Code is not formatted, run 'mise run fmt' locally" && exit 1)
- name: Lint
run: mise run lint
- 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