Skip to content
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

build(ci): Remove TravisCI #3149

Merged
merged 14 commits into from
Jan 8, 2021
16 changes: 14 additions & 2 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
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added timeouts to all tests as a run away job can eat up our capacity.

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: 15
billyvg marked this conversation as resolved.
Show resolved Hide resolved
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
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",
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
6 changes: 4 additions & 2 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,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