cache #3
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 | |
on: | |
pull_request: | |
merge_group: | |
push: | |
branches: | |
- main | |
- tests | |
jobs: | |
# INSTALL DEPS | |
install: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: "18.18.0" | |
cache: 'yarn' | |
- name: Download deps cache artifacts | |
uses: actions/download-artifact@v3 | |
with: | |
name: node_modules.tar.gz | |
- name: Unzip node_modules | |
run: tar xzf node_modules.tar.gz | |
- name: Install deps via Yarn | |
run: yarn | |
- name: Check for frozen lockfile | |
run: yarn check-lockfile | |
# TEST | |
test: | |
runs-on: ubuntu-latest | |
timeout-minutes: 25 | |
needs: [install] | |
env: | |
DISPLAY: :0 | |
VITEST_SEGFAULT_RETRY: 3 | |
steps: | |
- name: Run tests | |
continue-on-error: true | |
uses: actions/setup-node@v3 | |
with: | |
node-version: "18.18.0" | |
timeout_minutes: 25 | |
max_attempts: 2 | |
command: yarn test | |
# LINT, TYPECHECK, AUDIT | |
ci-checks: | |
runs-on: ubuntu-latest | |
needs: [install] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: "18.18.0" | |
- name: Download deps cache artifacts | |
uses: actions/download-artifact@v3 | |
with: | |
name: node_modules.tar.gz | |
- name: Unzip node_modules | |
run: tar xzf node_modules.tar.gz | |
- name: Lint | |
run: yarn lint | |
- name: Audit CI | |
run: yarn audit:ci | |
- name: Check types | |
run: yarn typecheck |