feat: Add GitHub button to title bar #14648
Workflow file for this run
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: CI | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
lint: | |
name: Lint | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0 | |
with: | |
fetch-depth: 0 | |
- name: Install pnpm | |
uses: pnpm/action-setup@v4 | |
- name: Setup Node.js | |
uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4 | |
with: | |
node-version: 20 | |
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] | |
node: [20] | |
services: | |
postgres: | |
image: postgres@sha256:4ec37d2a07a0067f176fdcc9d4bb633a5724d2cc4f892c7a2046d054bb6939e5 | |
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:6725a7dc7a44a6486b9d0a5172b10ccaf0c2ea600df87c0b93450d0e7769297f | |
# 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 | |
GITHUB_REPO_TOKEN: ${{ secrets.GITHUBS_REPO_TOKEN }} | |
NUXT_SESSION_PASSWORD: somerandompasswordNxFHaqCSPpBe6n5kRz2dru4hJ7K9bjgEtmsV8QAT3MDXcUfWGL | |
steps: | |
- name: Checkout | |
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0 | |
with: | |
fetch-depth: 0 | |
- name: Install pnpm | |
uses: pnpm/action-setup@v4 | |
- name: Setup Node.js | |
uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4 | |
with: | |
node-version: ${{ matrix.node }} | |
cache: 'pnpm' | |
- name: Install dependencies | |
run: pnpm install | |
- name: Init database | |
run: pnpm prisma:push | |
# 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 | |
- name: Start server | |
run: pnpm start & | |
- name: Run tests | |
run: pnpm run test --coverage | |
env: | |
TEST_URL: http://localhost:3000 | |
- name: Build Storybook | |
run: | | |
pnpm nuxi generate | |
pnpm storybook:build | |
cp .output/public/_storybook/external-iframe/index.html storybook-static/iframe.html | |
mkdir -p storybook-static/_storybook/external-iframe | |
cp -r .output/public/_nuxt storybook-static | |
- name: Publish and test Storybook | |
uses: chromaui/action@30b6228aa809059d46219e0f556752e8672a7e26 # v11 | |
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@b9fd7d16f6d7d1b5d2bec1a2887e65ceed900238 # v4.6.0 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} |