handle empty history #28
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 | |
on: | |
push: | |
branches: [ main, master ] | |
pull_request: | |
branches: [ main, master ] | |
jobs: | |
test: | |
timeout-minutes: 60 | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: lts/* | |
- name: Bootstrap env variables | |
env: | |
DATABASE_URL: "file:./evolver.db" | |
DEFAULT_DEVICE_PORT: 8080 | |
run: echo "DATABASE_URL=$DATABASE_URL" >> .env && echo "DEFAULT_DEVICE_PORT=$DEFAULT_DEVICE_PORT" >> .env | |
- name: Install dependencies | |
run: npm ci --include=dev && npm run bootstrap_dev_db && npm run bootstrap_evolver_ts_client | |
- name: Run unit tests and generate a coverage report | |
run: npm run test:coverage | |
- uses: actions/upload-artifact@v4 | |
if: always() | |
with: | |
name: vitest-report | |
path: vitest-report/ | |
retention-days: 30 |