Skip to content

Commit

Permalink
build(ci): Remove TravisCI (#3149)
Browse files Browse the repository at this point in the history
Travis sprung some surprise billing changes on us, so we are now prioritizing removing TravisCI completely.
  • Loading branch information
billyvg committed Jan 8, 2021
1 parent beaf207 commit 9f7d922
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 44 deletions.
16 changes: 14 additions & 2 deletions .github/workflows/build.yml
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 @@ -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: |
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: 45
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: 1 addition & 1 deletion packages/browser/test/integration/browsers.js
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
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
6 changes: 4 additions & 2 deletions scripts/test.sh
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,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"
Expand Down

0 comments on commit 9f7d922

Please sign in to comment.