51 lines
1.4 KiB
YAML
51 lines
1.4 KiB
YAML
name: Build and Test
|
|
|
|
on:
|
|
push:
|
|
|
|
jobs:
|
|
run-test:
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
matrix:
|
|
node-version: [20.x]
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
with:
|
|
lfs: 'true'
|
|
|
|
- name: Cache node modules
|
|
id: cache-npm
|
|
uses: actions/cache@v4
|
|
env:
|
|
cache-name: cache-node-modules
|
|
with:
|
|
# npm cache files are stored in `~/.npm` on Linux/macOS
|
|
path: ~/.npm
|
|
key: ${{ runner.os }}-node-${{ matrix.node-version }}-${{ hashFiles('**/package-lock.json') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-node-${{ matrix.node-version }}-
|
|
${{ runner.os }}-node-
|
|
${{ runner.os }}-
|
|
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: ${{ matrix.node-version }}
|
|
|
|
- name: Install dependencies
|
|
run: npm install
|
|
|
|
- name: Run Lint
|
|
run: npm run lint
|
|
|
|
- name: Run Build
|
|
run: npm run build
|
|
env:
|
|
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY: ${{ secrets.NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY }}
|
|
|
|
- name: Run Tests
|
|
run: npm run test
|