Skip to content
Closed
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
18 changes: 15 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ jobs:
job_build:
name: Build
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
Expand All @@ -31,6 +32,7 @@ jobs:
job_size_check:
name: Size Check
needs: job_build
timeout-minutes: 15
runs-on: ubuntu-latest
if: ${{ github.head_ref }}
steps:
Expand All @@ -54,6 +56,7 @@ jobs:
job_lint:
name: Lint
needs: job_build
timeout-minutes: 10
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand All @@ -70,15 +73,22 @@ jobs:
key: ${{ github.sha }}
- run: yarn install
- name: Run Linter
run: yarn lint
run: yarn lint:ci

job_unit_test:
name: Test
needs: job_build
continue-on-error: true
timeout-minutes: 30
runs-on: ubuntu-latest
strategy:
matrix:
node: [6, 8, 10, 12, 14]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node }}
- uses: actions/cache@v2
with:
path: |
Expand All @@ -89,9 +99,10 @@ jobs:
${{ github.workspace }}/packages/**/esm
${{ github.workspace }}/packages/serverless/dist-awslambda-layer/*.zip
key: ${{ github.sha }}
- run: yarn install
- name: Unit Tests
run: yarn test
env:
NODE_VERSION: ${{ matrix.node }}
run: ./scripts/test.sh
- uses: codecov/codecov-action@v1

job_artifacts:
Expand Down Expand Up @@ -129,6 +140,7 @@ jobs:
name: BrowserStack
needs: job_build
runs-on: ubuntu-latest
timeout-minutes: 15
if: "github.ref == 'refs/heads/master'"
steps:
- uses: actions/checkout@v2
Expand Down
37 changes: 0 additions & 37 deletions .travis.yml

This file was deleted.

2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@
"fix": "lerna run --stream --concurrency 1 fix",
"link:yarn": "lerna run --stream --concurrency 1 link:yarn",
"lint": "lerna run --stream --concurrency 1 lint",
"lint:ci": "lerna run --stream lint",
"test": "lerna run --stream --concurrency 1 --sort test",
"test:ci": "lerna run --stream --sort test",
"codecov": "codecov",
"pack:changed": "lerna run pack --since",
"postpublish": "make publish-docs"
Expand Down
2 changes: 1 addition & 1 deletion packages/browser/test/integration/browsers.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ module.exports = {
bs_android_6: {
base: "BrowserStack",
browser: "Android Browser",
device: "Samsung Galaxy Note 4",
device: "Google Nexus 6",
os: "android",
os_version: "6.0",
real_mobile: true,
Expand Down
4 changes: 2 additions & 2 deletions packages/browser/test/integration/karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ const browsers = isLocalRun ? ["ChromeHeadless"] : Object.keys(customLaunchers);
// for each browser here, so that we have a nice distinction of when the tests were run exactly.
if (!isLocalRun) {
for (const browser in customLaunchers) {
customLaunchers[browser].build = process.env.TRAVIS_BUILD_NUMBER
? `Travis: ${process.env.TRAVIS_BUILD_NUMBER}`
customLaunchers[browser].build = process.env.GITHUB_RUN_ID
? `CI: ${process.env.GITHUB_RUN_ID}`
: `Manual: ${new Date().toLocaleString()}`;
}
}
Expand Down
12 changes: 7 additions & 5 deletions scripts/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ set -e
source ~/.nvm/nvm.sh

# We need this check to skip engines check for typescript-tslint-plugin package
if [[ "$(cut -d. -f1 <<< "$TRAVIS_NODE_VERSION")" -le 6 ]]; then
if [[ "$(cut -d. -f1 <<< "$NODE_VERSION")" -le 6 ]]; then
nvm install 8
nvm use 8
yarn install --ignore-engines --ignore-scripts
# current versions of nock don't support node 6
Expand All @@ -12,17 +13,18 @@ if [[ "$(cut -d. -f1 <<< "$TRAVIS_NODE_VERSION")" -le 6 ]]; then
cd ../..
# ember requires Node >= 10 to build
yarn build --ignore="@sentry/ember" --ignore="@sentry/serverless" --ignore="@sentry/gatsby" --ignore="@sentry/react"
nvm install 6
nvm use 6
# browser can be tested only on Node >= v8 because Karma is not supporting anything older
yarn test --ignore="@sentry/tracing" --ignore="@sentry/react" --ignore="@sentry/gatsby" --ignore="@sentry/ember" --ignore="@sentry-internal/eslint-plugin-sdk" --ignore="@sentry-internal/eslint-config-sdk" --ignore="@sentry/serverless" --ignore="@sentry/browser" --ignore="@sentry/integrations"
elif [[ "$(cut -d. -f1 <<< "$TRAVIS_NODE_VERSION")" -le 8 ]]; then
yarn test:ci --ignore="@sentry/tracing" --ignore="@sentry/react" --ignore="@sentry/gatsby" --ignore="@sentry/ember" --ignore="@sentry-internal/eslint-plugin-sdk" --ignore="@sentry-internal/eslint-config-sdk" --ignore="@sentry/serverless" --ignore="@sentry/browser" --ignore="@sentry/integrations"
elif [[ "$(cut -d. -f1 <<< "$NODE_VERSION")" -le 8 ]]; then
yarn install --ignore-engines --ignore-scripts
# ember requires Node >= 10 to build
yarn build --ignore="@sentry/ember" --ignore="@sentry/serverless" --ignore="@sentry/gatsby" --ignore="@sentry/react"
# serverless, tracing, ember and react work only on Node >= v10
yarn test --ignore="@sentry/tracing" --ignore="@sentry/react" --ignore="@sentry/gatsby" --ignore="@sentry/ember" --ignore="@sentry-internal/eslint-plugin-sdk" --ignore="@sentry-internal/eslint-config-sdk" --ignore="@sentry/serverless"
yarn test:ci --ignore="@sentry/tracing" --ignore="@sentry/react" --ignore="@sentry/gatsby" --ignore="@sentry/ember" --ignore="@sentry-internal/eslint-plugin-sdk" --ignore="@sentry-internal/eslint-config-sdk" --ignore="@sentry/serverless"
else
yarn install
yarn build
yarn test
yarn test:ci
fi