Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(ci): run website build before check scripts to avoid regression of #3461 #3463

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions .github/workflows/website-tests.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
name: website-tests
on:
# test
pull_request:
paths:
- "website/**"
Expand All @@ -13,7 +12,7 @@ concurrency:
group: ci-${{ github.ref == 'refs/heads/main' && github.run_id || github.ref }}-website-tests
cancel-in-progress: true
jobs:
checks:
check-format-and-types:
corneliusroemer marked this conversation as resolved.
Show resolved Hide resolved
name: Check format and types
runs-on: ubuntu-latest
timeout-minutes: 15
Expand All @@ -28,9 +27,11 @@ jobs:
- uses: actions/cache@v4
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('website/**/package-lock.json') }}
key: ${{ runner.os }}-node-${{ hashFiles('website/**/package-lock.json', 'website/**/package.json') }}
- run: npm ci
- run: npm run build # To avoid regression of #3461
- run: npm run check-format
if: always()
- run: npm run check-types
if: always()
unitTests:
Expand All @@ -49,7 +50,7 @@ jobs:
uses: actions/cache@v4
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('website/**/package-lock.json') }}
key: ${{ runner.os }}-node-${{ hashFiles('website/**/package-lock.json', 'website/**/package.json') }}
- name: Install dependencies
run: npm ci
- name: Run tests
Expand Down
4 changes: 2 additions & 2 deletions website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
"build": "astro build",
"preview": "astro preview",
"astro": "astro",
"check-format": "eslint --cache \"./**/*.{ts,tsx,astro}\" && prettier --ignore-path \"../.gitignore\" --check \"./**/*.{ts,tsx,json,astro,cjs,mjs,css,scss}\"",
"check-format": "eslint --cache \"./**/*.{ts,tsx,astro}\" && prettier --ignore-path \"../.gitignore\" \"./.gitignore\" --check \"./**/*.{ts,tsx,json,astro,cjs,mjs,css,scss}\"",
corneliusroemer marked this conversation as resolved.
Show resolved Hide resolved
"format": "eslint --cache \"./**/*.{ts,tsx,astro}\" --fix && npm run format-fast",
"format-fast": "prettier --ignore-path \"../.gitignore\" --write \"./**/*.{ts,tsx,json,astro,cjs,mjs,css,scss}\"",
"format-fast": "prettier --ignore-path \"../.gitignore\" --ignore-path \"./.gitignore\" --write \"./**/*.{ts,tsx,json,astro,cjs,mjs,css,scss}\"",
"test": "vitest",
"test-fast": "vitest --bail=1",
"e2e": "npx playwright test",
Expand Down
Loading