24/7 recordings #120
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: CI Frontend | |
on: | |
push: | |
branches: | |
- dev | |
- master | |
pull_request: ~ | |
env: | |
NODE_VERSION: 16 | |
defaults: | |
run: | |
working-directory: ./frontend | |
jobs: | |
lint: | |
name: Lint and check format | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out files from GitHub | |
uses: actions/[email protected] | |
- name: Set up Node ${{ env.NODE_VERSION }} | |
uses: actions/[email protected] | |
with: | |
node-version: ${{ env.NODE_VERSION }} | |
cache: npm | |
cache-dependency-path: ./frontend/package-lock.json | |
- name: Install dependencies | |
run: npm ci | |
- name: Run eslint | |
run: npm run lint:eslint | |
- name: Run prettier | |
run: npm run lint:prettier | |
- name: Run tsc | |
run: npm run lint:types | |
test: | |
name: Run tests | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out files from GitHub | |
uses: actions/[email protected] | |
- name: Set up Node ${{ env.NODE_VERSION }} | |
uses: actions/[email protected] | |
with: | |
node-version: ${{ env.NODE_VERSION }} | |
cache: npm | |
cache-dependency-path: ./frontend/package-lock.json | |
- name: Install dependencies | |
run: npm ci | |
- name: Run tests | |
run: npm run test | |
build: | |
name: Build frontend | |
needs: [lint, test] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out files from GitHub | |
uses: actions/[email protected] | |
- name: Set up Node ${{ env.NODE_VERSION }} | |
uses: actions/[email protected] | |
with: | |
node-version: ${{ env.NODE_VERSION }} | |
cache: npm | |
cache-dependency-path: ./frontend/package-lock.json | |
- name: Install dependencies | |
run: npm ci | |
- name: Run build | |
run: npm run build |