From 2fc0584f0de9f2b016a4202aef06d7a1b4c61a96 Mon Sep 17 00:00:00 2001 From: Ermal Kaleci Date: Thu, 9 Mar 2023 14:08:05 +0100 Subject: [PATCH] run all tests only on master (#238) --- .github/workflows/ci.yml | 3 +++ packages/e2e/src/build-block.test.ts | 4 +--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0a27e313..0c771bf7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,6 +9,8 @@ on: jobs: tests: runs-on: ubuntu-latest + env: + RUN_ALL_TESTS: ${{ github.ref_name == 'master' }} steps: - uses: actions/checkout@v3 with: @@ -40,4 +42,5 @@ jobs: - run: yarn build - run: yarn test - name: Test substrate-api-sidecard with chopsticks node + if: ${{ github.ref_name == 'master' }} run: yarn workspace @acala-network/chopsticks-e2e run sidecar diff --git a/packages/e2e/src/build-block.test.ts b/packages/e2e/src/build-block.test.ts index 7e13d2ab..3d669861 100644 --- a/packages/e2e/src/build-block.test.ts +++ b/packages/e2e/src/build-block.test.ts @@ -22,9 +22,7 @@ describe.each([ await teardownAll() }) - // this is slow and flacky - // TODO: enable this only for nightly tests - it.skip('build blocks', async () => { + it.skipIf(!process.env.RUN_ALL_TESTS)('build blocks', async () => { const { chain, ws, teardown } = await setup() const blockNumber = chain.head.number await ws.send('dev_newBlock', [{ count: 2 }])