Skip to content

build: Extract NextJS integration tests into own workflow #4649

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 1, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
3 changes: 2 additions & 1 deletion packages/nextjs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down