diff --git a/.github/workflows/continuous-integration-secure.yml b/.github/workflows/continuous-integration-secure.yml index d32367bb09..13262d420b 100644 --- a/.github/workflows/continuous-integration-secure.yml +++ b/.github/workflows/continuous-integration-secure.yml @@ -41,7 +41,6 @@ jobs: id: tag-name uses: actions/github-script@v7 with: - # TODO: READD test to required_contexts! script: | const environment = process.env.PR_NUMBER ? `preview-pr${process.env.PR_NUMBER}` : 'preview-main'; const payload = { owner: context.repo.owner, repo: context.repo.repo, environment }; @@ -49,7 +48,7 @@ jobs: ...payload, ref: context.payload.workflow_run.head_sha, auto_merge: false, - required_contexts: ['integrity', 'build', 'lint'] + required_contexts: ['integrity', 'build', 'test', 'lint'] }); await github.rest.repos.createDeploymentStatus({ ...payload, diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index b1c1e05fbd..2beaf55455 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -35,7 +35,32 @@ jobs: run: yarn integrity - name: 'Integrity: Assert no changes (run `yarn integrity` if this fails)' run: git diff --exit-code - # TODO: readd! + + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version-file: .nvmrc + cache: yarn + - run: yarn install --frozen-lockfile --non-interactive + + - name: Install browser dependencies + run: yarn playwright install-deps + - name: Run tests + run: yarn test + env: + NODE_ENV: production + - name: Assert no new snapshots (run `yarn test --ci` if this fails) + run: git diff --exit-code + - name: Store coverage + if: github.event_name == 'pull_request' + uses: actions/upload-artifact@v4 + with: + name: coverage + path: coverage/ + build: runs-on: ubuntu-latest steps: @@ -59,7 +84,7 @@ jobs: is-pr-open: runs-on: ubuntu-latest if: github.event_name == 'push' - needs: [build, lint] + needs: [build, lint, test] outputs: is-PR: ${{ !!fromJson(steps.get_issue_number.outputs.result).number }} is-draft: ${{ fromJson(steps.get_issue_number.outputs.result).draft }}