Skip to content

Commit

Permalink
build: revert disabling tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jeripeierSBB committed Apr 24, 2024
1 parent eb07d94 commit e084b00
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 4 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/continuous-integration-secure.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,14 @@ 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 };
const { data: deployment } = await github.rest.repos.createDeployment({
...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,
Expand Down
29 changes: 27 additions & 2 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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 }}
Expand Down

0 comments on commit e084b00

Please sign in to comment.