wildebeest/.github/workflows/PRs.yml

43 wiersze
1.0 KiB
YAML

name: Pull request checks
on:
push:
pull_request:
# This allows a subsequently queued workflow run to interrupt previous runs
concurrency:
group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}'
cancel-in-progress: true
jobs:
test-api:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 16.13.x
- name: Install
run: yarn
- name: Check formatting
run: yarn pretty
- name: Run API tests
run: yarn test
test-ui:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 16.13.x
- name: Install
run: yarn && yarn --cwd frontend
- name: Initialize local database
run: yarn database:create-mock
- name: Run UI tests
run: yarn test:ui