ci: run vitest on every push #1
This file contains 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: Unit Tests (Vitest) | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
jobs: | |
test: | |
timeout-minutes: 2 | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up TeX Live | |
uses: teatimeguest/setup-texlive-action@v3 | |
with: | |
packages: | | |
scheme-basic | |
texlive | |
- name: Set up Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: lts/* | |
- name: Install PNPM | |
run: npm install -g pnpm | |
- name: Install Node.js dependencies | |
run: pnpm install | |
- name: Run Unit Tests | |
run: pnpm test | |
- uses: actions/upload-artifact@v4 | |
if: always() | |
with: | |
name: vitest-report | |
path: vitest-report/ | |
retention-days: 30 |