chore(deps): update dependency start-server-and-test to ^2.0.7 #21
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: | |
types: | |
- opened | |
- synchronize | |
- reopened | |
- ready_for_review | |
merge_group: | |
workflow_dispatch: | |
permissions: | |
contents: read | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.number || github.ref }} | |
cancel-in-progress: ${{ github.ref_name != 'main' }} | |
env: | |
NEXT_TELEMETRY_DISABLED: 1 | |
jobs: | |
prefetch: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/[email protected] | |
- name: Setup Node.js | |
uses: actions/[email protected] | |
with: | |
node-version: 22 | |
cache: npm | |
- name: Install dependencies | |
run: npm ci | |
build: | |
needs: [prefetch] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/[email protected] | |
- name: Setup Node.js | |
uses: actions/[email protected] | |
with: | |
node-version: 22 | |
cache: npm | |
- name: Next.js cache | |
uses: actions/[email protected] | |
with: | |
path: | | |
~/.npm | |
${{ github.workspace }}/.next/cache | |
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}-${{ hashFiles('**/*.js', '**/*.jsx', '**/*.ts', '**/*.tsx') }} | |
restore-keys: | | |
${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}- | |
- name: Install dependencies | |
run: npm ci | |
- name: Build | |
run: npm run build | |
test-unit: | |
needs: [prefetch] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/[email protected] | |
- name: Setup Node.js | |
uses: actions/[email protected] | |
with: | |
node-version: 20 | |
cache: npm | |
- name: Install dependencies | |
run: npm ci | |
- name: Unit tests | |
run: npm test | |
docker: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/[email protected] | |
- uses: docker/[email protected] | |
- uses: docker/[email protected] | |
- run: cp .env.local.example .env.local | |
- name: Build Docker image | |
uses: docker/[email protected] | |
with: | |
file: ./Dockerfile | |
context: . | |
cache-from: type=gha | |
cache-to: type=gha,mode=max | |
push: false |