Skip to content

Commit 1c6e7ba

Browse files
committed
build: Extract NextJS integration tests into own workflow
1 parent ab73aa8 commit 1c6e7ba

File tree

2 files changed

+35
-1
lines changed

2 files changed

+35
-1
lines changed

.github/workflows/build.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,39 @@ jobs:
203203
- name: Compute test coverage
204204
uses: codecov/codecov-action@v1
205205

206+
job_nextjs_integration_test:
207+
name: Test @sentry/nextjs on (Node ${{ matrix.node }})
208+
needs: job_build
209+
continue-on-error: true
210+
timeout-minutes: 30
211+
runs-on: ubuntu-latest
212+
strategy:
213+
matrix:
214+
node: [10, 12, 14, 16]
215+
steps:
216+
- name: Check out current commit (${{ github.sha }})
217+
uses: actions/checkout@v2
218+
- name: Set up Node
219+
uses: actions/setup-node@v1
220+
with:
221+
node-version: ${{ matrix.node }}
222+
- name: Check dependency cache
223+
uses: actions/cache@v2
224+
with:
225+
path: ${{ env.CACHED_DEPENDENCY_PATHS }}
226+
key: ${{ needs.job_build.outputs.dependency_cache_key }}
227+
- name: Check build cache
228+
uses: actions/cache@v2
229+
with:
230+
path: ${{ env.CACHED_BUILD_PATHS }}
231+
key: ${{ env.BUILD_CACHE_KEY }}
232+
- name: Run tests
233+
env:
234+
NODE_VERSION: ${{ matrix.node }}
235+
run: |
236+
cd packages/nextjs
237+
yarn test:integration
238+
206239
# Ember tests are separate from the rest because they are the slowest part of the test suite, and making them a
207240
# separate job allows them to run in parallel with the other tests.
208241
job_ember_tests:

packages/nextjs/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,8 @@
6363
"lint:eslint": "eslint . --cache --cache-location '../../eslintcache/' --format stylish",
6464
"lint:prettier": "prettier --check \"{src,test}/**/*.ts\"",
6565
"pack": "npm pack",
66-
"test": "run-s test:unit test:integration",
66+
"test": "run-s test:unit",
67+
"test:all": "run-s test:unit test:integration",
6768
"test:unit": "jest",
6869
"test:integration": "test/run-integration-tests.sh",
6970
"test:watch": "jest --watch",

0 commit comments

Comments
 (0)