Skip to content

ci: run checks first then run build #20

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

Merged
merged 3 commits into from
Jun 11, 2025
Merged
Changes from all 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
43 changes: 19 additions & 24 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,39 +7,34 @@ on:
pull_request:

jobs:
build:
code_quality:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20.x, 24.x]
name: Build on v${{ matrix.node-version }}
steps:
- uses: actions/checkout@v4

- name: Setup pnpm
uses: pnpm/action-setup@v2

- name: Setup Node.js v${{ matrix.node-version }}
uses: actions/setup-node@v4
- uses: pnpm/action-setup@v2
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
node-version: 22.x
cache: 'pnpm'

- name: Cache pnpm store
uses: actions/cache@v4
with:
path: ~/.pnpm-store
key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-
- run: pnpm install --frozen-lockfile
- run: pnpm lint
- run: pnpm typecheck

- name: Cache Next.js build cache
uses: actions/cache@v4
build:
needs: code_quality
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v2
- uses: actions/setup-node@v4
with:
node-version: 20.x
cache: 'pnpm'
- uses: actions/cache@v4
with:
path: .next/cache
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/pnpm-lock.yaml') }}-${{ hashFiles('**/*.js', '**/*.jsx', '**/*.ts', '**/*.tsx') }}
restore-keys: |
${{ runner.os }}-nextjs-${{ hashFiles('**/pnpm-lock.yaml') }}-
key: ${{ runner.os }}-next-${{ hashFiles('**/pnpm-lock.yaml') }}

- run: pnpm install --frozen-lockfile
- run: pnpm build