Skip to content

ci: Migrate fully to gh actions #2821

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 12 commits into from
Aug 14, 2020
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
143 changes: 114 additions & 29 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,16 @@ jobs:
- uses: actions/cache@v2
with:
path: |
node_modules
*/*/node_modules
${{ github.workspace }}/node_modules
${{ github.workspace }}/packages/**/node_modules
${{ github.workspace }}/packages/**/build
${{ github.workspace }}/packages/**/dist
${{ github.workspace }}/packages/**/esm
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
- name: Install
run: yarn install
- name: Build
run: yarn build
- name: Archive production artifacts
uses: actions/upload-artifact@v2
with:
name: build
path: |
${{ github.workspace }}/packages/**/build
${{ github.workspace }}/packages/**/dist
${{ github.workspace }}/packages/**/esm

job_size_check:
name: Size Check
Expand All @@ -42,13 +37,12 @@ jobs:
- uses: actions/cache@v2
with:
path: |
node_modules
*/*/node_modules
${{ github.workspace }}/node_modules
${{ github.workspace }}/packages/**/node_modules
${{ github.workspace }}/packages/**/build
${{ github.workspace }}/packages/**/dist
${{ github.workspace }}/packages/**/esm
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
- uses: actions/download-artifact@v2
with:
name: build
path: ${{ github.workspace }}/packages
- uses: andresz1/size-limit-action@v1.4.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -64,14 +58,13 @@ jobs:
- uses: actions/cache@v2
with:
path: |
node_modules
*/*/node_modules
${{ github.workspace }}/node_modules
${{ github.workspace }}/packages/**/node_modules
${{ github.workspace }}/packages/**/build
${{ github.workspace }}/packages/**/dist
${{ github.workspace }}/packages/**/esm
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
- run: yarn install
- uses: actions/download-artifact@v2
with:
name: build
path: ${{ github.workspace }}/packages
- name: Run Linter
run: yarn lint

Expand All @@ -85,13 +78,105 @@ jobs:
- uses: actions/cache@v2
with:
path: |
node_modules
*/*/node_modules
${{ github.workspace }}/node_modules
${{ github.workspace }}/packages/**/node_modules
${{ github.workspace }}/packages/**/build
${{ github.workspace }}/packages/**/dist
${{ github.workspace }}/packages/**/esm
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
- run: yarn install
- uses: actions/download-artifact@v2
with:
name: build
path: ${{ github.workspace }}/packages
- name: Unit Tests
run: yarn test
run: yarn test --ignore="@sentry/ember"
- uses: codecov/codecov-action@v1

job_browserstack_test:
name: BrowserStack
needs: job_build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
- uses: actions/cache@v2
with:
path: |
${{ github.workspace }}/node_modules
${{ github.workspace }}/packages/**/node_modules
${{ github.workspace }}/packages/**/build
${{ github.workspace }}/packages/**/dist
${{ github.workspace }}/packages/**/esm
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
- run: yarn install
- name: Integration Tests
env:
BROWSERSTACK_USERNAME: ${{ secrets.BROWSERSTACK_USERNAME }}
BROWSERSTACK_ACCESS_KEY: ${{ secrets.BROWSERSTACK_ACCESS_KEY }}
if: "'refs/heads/master' == github.ref || startsWith(github.ref, 'refs/tags/')"
run: |
cd packages/browser
yarn test:integration:checkbrowsers
yarn test:integration
yarn test:package

job_zeus:
name: Zeus
needs: job_build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
- uses: actions/cache@v2
with:
path: |
${{ github.workspace }}/node_modules
${{ github.workspace }}/packages/**/node_modules
${{ github.workspace }}/packages/**/build
${{ github.workspace }}/packages/**/dist
${{ github.workspace }}/packages/**/esm
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
- run: yarn install
- name: Install Zeus
run: |
yarn global add @zeus-ci/cli
echo "::add-path::$(yarn global bin)"
- name: Upload to Zeus
env:
ZEUS_API_TOKEN: ${{ secrets.ZEUS_API_TOKEN }}
ZEUS_HOOK_BASE: ${{ secrets.ZEUS_HOOK_BASE }}
run: |
zeus job update -b $GITHUB_RUN_ID -j $GITHUB_RUN_NUMBER -r $GITHUB_SHA
yarn pack:changed
zeus upload -b $GITHUB_RUN_ID -j $GITHUB_RUN_NUMBER -t "application/tar+npm" ./packages/**/*.tgz
zeus upload -b $GITHUB_RUN_ID -j $GITHUB_RUN_NUMBER -t "application/javascript" ./packages/browser/build/*
zeus upload -b $GITHUB_RUN_ID -j $GITHUB_RUN_NUMBER -t "application/javascript" ./packages/integrations/build/*
zeus upload -b $GITHUB_RUN_ID -j $GITHUB_RUN_NUMBER -t "application/javascript" ./packages/apm/build/*
zeus upload -b $GITHUB_RUN_ID -j $GITHUB_RUN_NUMBER -t "application/javascript" ./packages/tracing/build/*
zeus job update --status=passed -b $GITHUB_RUN_ID -j $GITHUB_RUN_NUMBER -r $GITHUB_SHA

job_artifacts:
name: Artifacts Upload
needs: job_build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
- uses: actions/cache@v2
with:
path: |
${{ github.workspace }}/node_modules
${{ github.workspace }}/packages/**/node_modules
${{ github.workspace }}/packages/**/build
${{ github.workspace }}/packages/**/dist
${{ github.workspace }}/packages/**/esm
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
- name: Pack
run: yarn pack:changed
- name: Archive Artifacts
uses: actions/upload-artifact@v2
with:
name: ${{ github.sha }}
path: |
${{ github.workspace }}/packages/browser/build/**
${{ github.workspace }}/packages/integrations/build/**
${{ github.workspace }}/packages/apm/build/**
${{ github.workspace }}/packages/tracing/build/**
${{ github.workspace }}/packages/**/*.tgz
13 changes: 0 additions & 13 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,6 @@ cache:

jobs:
include:
- stage: Test
name: '@sentry/packages - build + lint + test + codecov + danger [node v12]'
node_js: '12'
script: scripts/danger.sh
- name: '@sentry/packages - build and test [node v6]'
node_js: '6'
script: scripts/test.sh
Expand All @@ -36,15 +32,6 @@ jobs:
- name: '@sentry/packages - build and test [node v12]'
node_js: '12'
script: scripts/test.sh
- name: '@sentry/browser - browserstack integration tests'
node_js: '12'
script: scripts/browser-integration.sh
if: fork = false
- stage: Deploy
name: '@sentry/packages - pack and zeus upload'
node_js: '12'
if: branch =~ ^release/
script: scripts/pack-and-upload.sh

notifications:
webhooks:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<br />
</p>

[![Build Status](https://travis-ci.com/getsentry/sentry-javascript.svg?branch=master)](https://travis-ci.com/getsentry/sentry-javascript)
![Build & Test](https://github.com/getsentry/sentry-javascript/workflows/Build%20&%20Test/badge.svg)
[![codecov](https://codecov.io/gh/getsentry/sentry-javascript/branch/master/graph/badge.svg)](https://codecov.io/gh/getsentry/sentry-javascript)
[![npm version](https://img.shields.io/npm/v/@sentry/core.svg)](https://www.npmjs.com/package/@sentry/core)
[![typedoc](https://img.shields.io/badge/docs-typedoc-blue.svg)](http://getsentry.github.io/sentry-javascript/)
Expand Down
62 changes: 0 additions & 62 deletions dangerfile.ts

This file was deleted.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"lint": "lerna run --stream --concurrency 1 lint",
"test": "lerna run --stream --concurrency 1 --sort test",
"codecov": "codecov",
"pack:changed": "lerna run pack --since",
"postpublish": "make publish-docs"
},
"volta": {
Expand Down Expand Up @@ -47,7 +48,6 @@
"@types/sinon": "^7.0.11",
"chai": "^4.1.2",
"codecov": "^3.6.5",
"danger": "^7.1.3",
"jest": "^24.7.1",
"karma-browserstack-launcher": "^1.5.1",
"karma-firefox-launcher": "^1.1.0",
Expand Down
3 changes: 2 additions & 1 deletion packages/angular/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@
"lint:eslint": "eslint . --cache --cache-location '../../eslintcache/' --format stylish",
"fix": "run-s fix:eslint fix:prettier",
"fix:prettier": "prettier --write \"{src,test}/**/*.ts\"",
"fix:eslint": "eslint . --format stylish --fix"
"fix:eslint": "eslint . --format stylish --fix",
"pack": "npm pack"
},
"sideEffects": false
}
3 changes: 2 additions & 1 deletion packages/apm/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@
"fix:prettier": "prettier --write \"{src,test}/**/*.ts\"",
"fix:eslint": "eslint . --format stylish --fix",
"test": "jest",
"test:watch": "jest --watch"
"test:watch": "jest --watch",
"pack": "npm pack"
},
"jest": {
"collectCoverage": true,
Expand Down
3 changes: 2 additions & 1 deletion packages/browser/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,8 @@
"size:check": "run-p size:check:es5 size:check:es6",
"size:check:es5": "cat build/bundle.min.js | gzip -9 | wc -c | awk '{$1=$1/1024; print \"ES5: \",$1,\"kB\";}'",
"size:check:es6": "cat build/bundle.es6.min.js | gzip -9 | wc -c | awk '{$1=$1/1024; print \"ES6: \",$1,\"kB\";}'",
"version": "node ../../scripts/versionbump.js src/version.ts"
"version": "node ../../scripts/versionbump.js src/version.ts",
"pack": "npm pack"
},
"sideEffects": false
}
3 changes: 2 additions & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@
"fix:prettier": "prettier --write \"{src,test}/**/*.ts\"",
"fix:eslint": "eslint . --format stylish --fix",
"test": "jest",
"test:watch": "jest --watch"
"test:watch": "jest --watch",
"pack": "npm pack"
},
"jest": {
"collectCoverage": true,
Expand Down
3 changes: 2 additions & 1 deletion packages/ember/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@
"test:ember": "ember test",
"test:ember-compatibility": "ember try:each",
"prepublishOnly": "ember ts:precompile",
"postpublish": "ember ts:clean"
"postpublish": "ember ts:clean",
"pack": "npm pack"
},
"dependencies": {
"@sentry/browser": "5.21.1",
Expand Down
3 changes: 2 additions & 1 deletion packages/eslint-config-sdk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
"scripts": {
"link:yarn": "yarn link",
"lint": "prettier --check \"**/*.js\"",
"fix": "prettier --write \"**/*.js\""
"fix": "prettier --write \"**/*.js\"",
"pack": "npm pack"
}
}
3 changes: 2 additions & 1 deletion packages/eslint-plugin-sdk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
"link:yarn": "yarn link",
"lint": "prettier --check \"{src,test}/**/*.js\"",
"fix": "prettier --write \"{src,test}/**/*.js\"",
"test": "mocha test --recursive"
"test": "mocha test --recursive",
"pack": "npm pack"
}
}
3 changes: 2 additions & 1 deletion packages/gatsby/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@
"fix:prettier": "prettier --write \"{src,test}/**/*.ts\"",
"fix:eslint": "eslint . --format stylish --fix",
"test": "jest",
"test:watch": "jest --watch"
"test:watch": "jest --watch",
"pack": "npm pack"
},
"jest": {
"collectCoverage": true,
Expand Down
3 changes: 2 additions & 1 deletion packages/hub/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@
"fix:prettier": "prettier --write \"{src,test}/**/*.ts\"",
"fix:eslint": "eslint . --format stylish --fix",
"test": "jest",
"test:watch": "jest --watch"
"test:watch": "jest --watch",
"pack": "npm pack"
},
"jest": {
"collectCoverage": true,
Expand Down
3 changes: 2 additions & 1 deletion packages/integrations/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@
"fix:prettier": "prettier --write \"{src,test}/**/*.ts\"",
"fix:eslint": "eslint . --format stylish --fix",
"test": "jest",
"test:watch": "jest --watch"
"test:watch": "jest --watch",
"pack": "npm pack"
},
"jest": {
"collectCoverage": true,
Expand Down
Loading