52 feat add authentication #36
Workflow file for this run
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: NodeJS CI | |
on: | |
push: | |
branches: ["main"] | |
paths: ["frontend/**"] | |
pull_request: | |
branches: ["main", "dev"] | |
paths: ["frontend/**"] | |
permissions: | |
contents: read | |
defaults: | |
run: | |
working-directory: frontend | |
jobs: | |
build-ci: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Use Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: "20.x" | |
cache: "npm" | |
cache-dependency-path: "./frontend/package-lock.json" | |
- name: Install Task | |
uses: arduino/setup-task@v1 | |
with: | |
version: 3.x | |
repo-token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Install dependencies | |
run: npm ci | |
- name: Check lint | |
run: task lint | |
- name: Check format | |
run: task check-format | |
- name: Check types | |
run: task type-check | |
- name: Check build | |
run: task build | |
unit-test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Use Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: "20.x" | |
cache: "npm" | |
cache-dependency-path: "./frontend/package-lock.json" | |
- name: Install Task | |
uses: arduino/setup-task@v1 | |
with: | |
version: 3.x | |
repo-token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Install dependencies | |
run: npm ci | |
- name: Unit tests | |
run: task unit-test-ci |