diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d35d83396317..a430c311a16e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -203,6 +203,39 @@ jobs: - name: Compute test coverage uses: codecov/codecov-action@v1 + job_nextjs_integration_test: + name: Test @sentry/nextjs on (Node ${{ matrix.node }}) + needs: job_build + continue-on-error: true + timeout-minutes: 30 + runs-on: ubuntu-latest + strategy: + matrix: + node: [10, 12, 14, 16] + steps: + - name: Check out current commit (${{ github.sha }}) + uses: actions/checkout@v2 + - name: Set up Node + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node }} + - name: Check dependency cache + uses: actions/cache@v2 + with: + path: ${{ env.CACHED_DEPENDENCY_PATHS }} + key: ${{ needs.job_build.outputs.dependency_cache_key }} + - name: Check build cache + uses: actions/cache@v2 + with: + path: ${{ env.CACHED_BUILD_PATHS }} + key: ${{ env.BUILD_CACHE_KEY }} + - name: Run tests + env: + NODE_VERSION: ${{ matrix.node }} + run: | + cd packages/nextjs + yarn test:integration + # Ember tests are separate from the rest because they are the slowest part of the test suite, and making them a # separate job allows them to run in parallel with the other tests. job_ember_tests: diff --git a/packages/nextjs/package.json b/packages/nextjs/package.json index 87d495c3cdc1..ed1dd6d5050b 100644 --- a/packages/nextjs/package.json +++ b/packages/nextjs/package.json @@ -63,7 +63,8 @@ "lint:eslint": "eslint . --cache --cache-location '../../eslintcache/' --format stylish", "lint:prettier": "prettier --check \"{src,test}/**/*.ts\"", "pack": "npm pack", - "test": "run-s test:unit test:integration", + "test": "run-s test:unit", + "test:all": "run-s test:unit test:integration", "test:unit": "jest", "test:integration": "test/run-integration-tests.sh", "test:watch": "jest --watch",