From 2f048acbe6374ff6e8d9d750808c8b3e7bf7b333 Mon Sep 17 00:00:00 2001 From: zomars Date: Mon, 20 Feb 2023 21:47:01 -0700 Subject: [PATCH] WIP --- .github/workflows/pr.yml | 5 +++++ .github/workflows/test.yml | 26 +++++--------------------- 2 files changed, 10 insertions(+), 21 deletions(-) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 16cfee756c..0fb2f268e0 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -42,6 +42,11 @@ jobs: needs: setup uses: ./.github/workflows/check-types.yml + test: + name: Type check + needs: setup + uses: ./.github/workflows/test.yml + lint: name: Linters needs: setup diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index bfdeac9b47..7adf7874b2 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,33 +1,17 @@ name: Unit tests on: - pull_request_target: # So we can test on forks - branches: - - main - paths: - - apps/web/** - - packages/** + workflow_call: workflow_run: workflows: [Crowdin Action] types: [completed] -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true 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 - # Should be an 8GB machine as per https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners + - uses: actions/checkout@v2 + - uses: ./.github/actions/dangerous-git-checkout - run: echo 'NODE_OPTIONS="--max_old_space_size=6144"' >> $GITHUB_ENV - - name: Use Node 16.x - uses: actions/setup-node@v3 - with: - node-version: 16.x - cache: "yarn" - - run: yarn --frozen-lockfile + - uses: ./.github/actions/yarn-install + # Should be an 8GB machine as per https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners - run: yarn test