-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
dac29c8
commit 821f134
Showing
1 changed file
with
102 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
name: Pull Request Checks | ||
|
||
on: | ||
pull_request: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
quality: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Setup Biome | ||
uses: biomejs/setup-biome@v2 | ||
with: | ||
version: latest | ||
- name: Run Biome | ||
run: biome ci . | ||
|
||
build: | ||
name: Build | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Git Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 2 | ||
|
||
- name: Restore Cache | ||
uses: actions/cache/restore@v4 | ||
with: | ||
path: | | ||
~/.npm | ||
.next/cache | ||
node_modules/.cache | ||
key: cache-${{ hashFiles('package-lock.json') }}- | ||
restore-keys: cache- | ||
|
||
- name: Set up Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version-file: '.nvmrc' | ||
cache: 'npm' | ||
|
||
- name: Install NPM packages | ||
run: npm ci | ||
|
||
- name: Build Next.js | ||
run: | | ||
node --run build | ||
node --run postbuild | ||
- name: Save Cache | ||
uses: actions/cache/save@v4 | ||
with: | ||
path: | | ||
~/.npm | ||
.next/cache | ||
node_modules/.cache | ||
key: cache-${{ hashFiles('package-lock.json') }} | ||
|
||
unit-test: | ||
name: Unit Test | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Git Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 2 | ||
|
||
- name: Restore Cache | ||
uses: actions/cache/restore@v4 | ||
with: | ||
path: | | ||
~/.npm | ||
.next/cache | ||
node_modules/.cache | ||
key: cache-${{ hashFiles('package-lock.json') }}- | ||
restore-keys: cache- | ||
|
||
- name: Set up Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version-file: '.nvmrc' | ||
cache: 'npm' | ||
|
||
- name: Install NPM packages | ||
run: npm ci | ||
|
||
- name: Run Unit Tests | ||
run: node --run test | ||
|
||
- name: Save Cache | ||
uses: actions/cache/save@v4 | ||
with: | ||
path: | | ||
~/.npm | ||
.next/cache | ||
node_modules/.cache | ||
key: cache-${{ hashFiles('package-lock.json') }} |