build: upgrade cookie to v1.0.1 #51
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: | |
branches: | |
- main | |
workflow_dispatch: | |
jobs: | |
install: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Set up Node.js | |
uses: actions/setup-node@v4 | |
- name: Init cache | |
uses: actions/cache@v4 | |
with: | |
path: "~/.npm\nnode_modules" | |
key: cache-${{ hashFiles('package-lock.json') }} | |
- name: Install dependencies | |
run: npm ci | |
lint: | |
runs-on: ubuntu-latest | |
needs: install | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Set up Node.js | |
uses: actions/setup-node@v4 | |
- name: Init cache | |
uses: actions/cache/restore@v4 | |
with: | |
path: "~/.npm\nnode_modules" | |
key: cache-${{ hashFiles('package-lock.json') }} | |
- name: Install dependencies | |
run: npm ci | |
- name: Lint codebase | |
run: npm run lint | |
- name: Format code | |
run: npm run format -- --check | |
type-check: | |
runs-on: ubuntu-latest | |
needs: install | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Set up Node.js | |
uses: actions/setup-node@v4 | |
- name: Init cache | |
uses: actions/cache/restore@v4 | |
with: | |
path: "~/.npm\nnode_modules" | |
key: cache-${{ hashFiles('package-lock.json') }} | |
- name: Install dependencies | |
run: npm ci | |
- name: Type check | |
run: npm run check | |
test: | |
runs-on: ubuntu-latest | |
needs: install | |
container: | |
image: mcr.microsoft.com/playwright:v1.48.0-jammy | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Set up Node.js | |
uses: actions/setup-node@v4 | |
- name: Init cache | |
uses: actions/cache/restore@v4 | |
with: | |
path: "~/.npm\nnode_modules" | |
key: cache-${{ hashFiles('package-lock.json') }} | |
- name: Install dependencies | |
run: npm ci | |
- name: Run unit tests | |
run: npm run test:unit | |
- name: Run integration tests | |
run: npm run test:integration | |
env: | |
HOME: /root | |
build: | |
runs-on: ubuntu-latest | |
needs: [install, lint, type-check, test] | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Set up Node.js | |
uses: actions/setup-node@v4 | |
- name: Init cache | |
uses: actions/cache/restore@v4 | |
with: | |
path: "~/.npm\nnode_modules" | |
key: cache-${{ hashFiles('package-lock.json') }} | |
- name: Install dependencies | |
run: npm ci | |
- name: Build the project | |
run: npm run build |