28 lines
720 B
YAML
28 lines
720 B
YAML
name: 'Tests'
|
|
|
|
on:
|
|
pull_request:
|
|
push:
|
|
|
|
jobs:
|
|
tests:
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
content: read
|
|
pull-requests: write
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: cachix/install-nix-action@v31.4.0
|
|
- uses: cachix/cachix-action@v14
|
|
with:
|
|
name: devenv
|
|
- name: Install devenv.sh
|
|
run: nix profile install nixpkgs#devenv
|
|
- name: Install NPM dependencies
|
|
run: devenv shell npm install
|
|
- name: Build the devenv shell and run any pre-commit hooks and project tests
|
|
run: devenv test
|
|
- name: Report coverage
|
|
if: gitea.event_name == 'pull_request'
|
|
uses: davelosert/vitest-coverage-report-action@v2
|