Skip to content

chore(deps): update vitest #17938

chore(deps): update vitest

chore(deps): update vitest #17938

Workflow file for this run

name: CI
on:
push:
branches:
- main
pull_request:
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0
- name: Install pnpm
uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v4.4.0
- name: Setup Node.js
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: 24.15.0
cache: 'pnpm'
- name: Install dependencies
run: pnpm install
- name: Run linter
run: pnpm lint
- name: Check types
run: pnpm typecheck
- name: Validate GraphQL operations
run: pnpm validate
test:
name: Build & Test
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
services:
postgres:
image: postgres@sha256:78481659c47e862334611ccdaf7c369c986b3046da9857112f3b309114a65fb4
env:
POSTGRES_PASSWORD: postgres
POSTGRES_DB: jabref
# Set health checks to wait until postgres has started
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
redis:
image: redis@sha256:25dbb04fc4d6d190eda327dab551631500b0f9ac8f9808e8e63b7fda1ddff196
# Set health checks to wait until redis has started
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
# Maps port 6379 on service container to port 6380 on host
- 6380:6379
env:
DATABASE_URL: postgresql://postgres:postgres@localhost:5432/jabref?schema=public
SHADOW_DATABASE_URL: postgresql://postgres:postgres@localhost:5432/jabref_shadow
SESSION_PASSWORD: somerandompasswordNxFHaqCSPpBe6n5kRz2dru4hJ7K9bjgEtmsV8QAT3MDXcUfWGL
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0
- name: Install pnpm
uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v4.4.0
- name: Setup Node.js
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: 24.15.0
cache: 'pnpm'
- name: Install dependencies
run: pnpm install
- name: Init database
run: pnpm prisma:push
env:
NUXT_DATABASE_URL: ${{ env.DATABASE_URL }}
# Check that no schema changes have been done without corresponding migration files have been added
- name: Create shadow database for schema drift detection
run: PGPASSWORD=postgres psql -h localhost -U postgres -c "CREATE DATABASE jabref_shadow;"
- name: Detect database schema drift
run: pnpm prisma:migrate:diff
env:
NUXT_DATABASE_URL: ${{ env.DATABASE_URL }}
NUXT_SHADOW_DATABASE_URL: ${{ env.SHADOW_DATABASE_URL }}
- name: Build
run: pnpm build
env:
NUXT_SESSION_PASSWORD: ${{ env.SESSION_PASSWORD }} # Needed for prerending
- name: Start server
run: pnpm start &
env:
NUXT_GITHUB_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NUXT_SESSION_PASSWORD: ${{ env.SESSION_PASSWORD }}
NUXT_DATABASE_URL: ${{ env.DATABASE_URL }}
- name: Run tests
run: pnpm run test --coverage
env:
TEST_URL: http://localhost:3000
NUXT_DATABASE_URL: ${{ env.DATABASE_URL }} # To seed the database
# The tests need these tokens to run, but their actual value should not matter
NUXT_GITHUB_REPO_TOKEN: 'SIGNAL_TO_RUN_TEST'
- name: Build Storybook
if: always()
run: pnpm storybook:build
- name: Publish and test Storybook
if: always()
uses: chromaui/action@eea1606238fd97a70b5af723d103953d1f40967b # v15.3.1
with:
projectToken: 'b3787adf2fa5'
# Don't wait until Chroma verified the build (for this we have the Github check)
exitOnceUploaded: true
storybookBuildDir: storybook-static
debug: true
- name: Upload coverage to Codecov
uses: codecov/codecov-action@75cd11691c0faa626561e295848008c8a7dddffe # v5.5.4
with:
token: ${{ secrets.CODECOV_TOKEN }}