2022-09-02 02:00:48 +00:00
|
|
|
name: Unit tests
|
|
|
|
on:
|
2022-11-03 20:29:14 +00:00
|
|
|
pull_request_target: # So we can test on forks
|
2022-09-02 02:00:48 +00:00
|
|
|
branches:
|
|
|
|
- main
|
|
|
|
paths:
|
|
|
|
- apps/web/**
|
|
|
|
- packages/**
|
2023-01-12 21:22:11 +00:00
|
|
|
workflow_run:
|
|
|
|
workflows: [Crowdin Action]
|
|
|
|
types: [completed]
|
2022-09-08 17:01:47 +00:00
|
|
|
concurrency:
|
|
|
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
|
|
|
cancel-in-progress: true
|
2022-09-02 02:00:48 +00:00
|
|
|
jobs:
|
|
|
|
test:
|
|
|
|
timeout-minutes: 20
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout repo
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
ref: ${{ github.event.pull_request.head.sha }} # So we can test on forks
|
|
|
|
fetch-depth: 2
|
2022-11-11 09:57:44 +00:00
|
|
|
# Should be an 8GB machine as per https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners
|
|
|
|
- run: echo 'NODE_OPTIONS="--max_old_space_size=6144"' >> $GITHUB_ENV
|
2022-09-02 02:00:48 +00:00
|
|
|
- name: Use Node 16.x
|
|
|
|
uses: actions/setup-node@v3
|
|
|
|
with:
|
|
|
|
node-version: 16.x
|
|
|
|
cache: "yarn"
|
|
|
|
- run: yarn --frozen-lockfile
|
|
|
|
- run: yarn test
|