Skip to content

chore: migrate TypeScript Storybook stories to Vue format #17214

chore: migrate TypeScript Storybook stories to Vue format

chore: migrate TypeScript Storybook stories to Vue format #17214

Workflow file for this run

name: CI
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
fetch-depth: 0
- name: Install pnpm
uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0
- name: Setup Node.js
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
with:
node-version: 24.11.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:41fc5342eefba6cc2ccda736aaf034bbbb7c3df0fdb81516eba1ba33f360162c
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:5c7c0445ed86918cb9efb96d95a6bfc03ed2059fe2c5f02b4d74f477ffe47915
# 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
SESSION_PASSWORD: somerandompasswordNxFHaqCSPpBe6n5kRz2dru4hJ7K9bjgEtmsV8QAT3MDXcUfWGL
steps:
- name: Checkout
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
fetch-depth: 0
- name: Install pnpm
uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0
- name: Setup Node.js
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
with:
node-version: 24.11.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: Detect database schema drift
run: pnpm prisma:migrate:diff $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.GITHUBS_REPO_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@ac86f2ff0a458ffbce7b40698abd44c0fa34d4b6 # v13.3.3
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@5a1091511ad55cbe89839c7260b706298ca349f7 # v5.5.1
with:
token: ${{ secrets.CODECOV_TOKEN }}