diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1dd7b0a3376a..359370cf4f4a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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 @@ -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: @@ -54,6 +56,7 @@ jobs: job_lint: name: Lint needs: job_build + timeout-minutes: 10 runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 @@ -75,10 +78,17 @@ jobs: 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: | @@ -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: @@ -129,6 +140,7 @@ jobs: name: BrowserStack needs: job_build runs-on: ubuntu-latest + timeout-minutes: 45 if: "github.ref == 'refs/heads/master'" steps: - uses: actions/checkout@v2 diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index cc663a685da8..000000000000 --- a/.travis.yml +++ /dev/null @@ -1,37 +0,0 @@ -git: - depth: false # we need this to make proper releases - -branches: - only: - - master - - /^release\/.+$/ - - /^major\/.+$/ - -install: yarn --ignore-engines --ignore-scripts -os: linux - -language: node_js -dist: bionic - -cache: - yarn: true - directories: - - node_modules - -jobs: - include: - - name: '@sentry/packages - build and test [node v6]' - node_js: '6' - script: scripts/test.sh - - name: '@sentry/packages - build and test [node v8]' - node_js: '8' - script: scripts/test.sh - - name: '@sentry/packages - build and test [node v10]' - node_js: '10' - script: scripts/test.sh - - name: '@sentry/packages - build and test [node v12]' - node_js: '12' - script: scripts/test.sh - - name: '@sentry/packages - build and test [node v14]' - node_js: '14' - script: scripts/test.sh diff --git a/packages/browser/test/integration/browsers.js b/packages/browser/test/integration/browsers.js index 8e81160ca7a5..ee226a872545 100644 --- a/packages/browser/test/integration/browsers.js +++ b/packages/browser/test/integration/browsers.js @@ -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, diff --git a/packages/browser/test/integration/karma.conf.js b/packages/browser/test/integration/karma.conf.js index 2f802487c3ba..cd94f5b335c7 100644 --- a/packages/browser/test/integration/karma.conf.js +++ b/packages/browser/test/integration/karma.conf.js @@ -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()}`; } } diff --git a/scripts/test.sh b/scripts/test.sh index ff98d2485259..a6948100519e 100755 --- a/scripts/test.sh +++ b/scripts/test.sh @@ -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 @@ -12,10 +13,11 @@ 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 +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"