yarn lint --fix #108
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
on: | |
push: | |
branches-ignore: | |
- main # Because "Require branches to be up to date before merging" is enabled for main. The checking will be completed before pull request can be merged. | |
name: Common checks | |
jobs: | |
backend-common-checks: | |
# TODO: only change in backend/** and this yml will trigger this job | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: ./backend | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Use Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '20.x' | |
cache: 'yarn' | |
cache-dependency-path: ./backend/yarn.lock | |
- run: yarn install --immutable | |
- name: Linting | |
run: yarn lint | |
- name: Type checking | |
run: yarn ts:check | |
- name: Check formatting | |
run: yarn format:check | |
- name: Run unit tests | |
run: yarn test:ci | |
backend-integration-tests: | |
runs-on: ubuntu-latest | |
container: node:20 | |
defaults: | |
run: | |
working-directory: ./backend | |
services: | |
# Label used to access the service container | |
postgres: | |
# Docker Hub image | |
image: postgres | |
# Provide the password for postgres | |
env: | |
POSTGRES_USER: postgres | |
POSTGRES_PASSWORD: postgres | |
POSTGRES_DB: postgres | |
steps: | |
- uses: actions/checkout@v4 | |
- run: yarn install --immutable | |
- name: Run integration tests | |
run: yarn integration-test --ci | |
env: | |
POSTGRES_HOST: postgres | |
POSTGRES_PORT: 5432 | |
POSTGRES_USER: postgres | |
POSTGRES_PASSWORD: postgres | |
POSTGRES_DB: postgres | |
frontend-common-checks: | |
# TODO: only change in frontend/** and this yml will trigger this job | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: ./frontend | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Use Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '20.x' | |
cache: 'yarn' | |
cache-dependency-path: ./frontend/yarn.lock | |
- run: yarn install --immutable | |
- name: Linting | |
run: yarn lint | |
- name: Type checking | |
run: yarn ts:check | |
- name: Check formatting | |
run: yarn format:check | |
- name: Run unit tests | |
run: yarn test:ci |