Skip to content

Commit aa60eea

Browse files
authored
feat: Phase 1 - GH Actions (#2763)
* ref: Change sizelimit to only webpack and size * feat: Add build gh action * ref: Update build * ci: Fix * fix: yarn.lock * ci: Needs job1 * ci: try different download * ci: Fix lint step as well * ci: Build and bundle size
1 parent 6fc494c commit aa60eea

File tree

5 files changed

+182
-291
lines changed

5 files changed

+182
-291
lines changed

.github/workflows/build.yml

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
name: 'Build & Test'
2+
on:
3+
push:
4+
branches:
5+
- master
6+
- release/**
7+
pull_request:
8+
9+
jobs:
10+
job_build:
11+
name: Build
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v2
15+
- uses: actions/setup-node@v1
16+
- uses: actions/cache@v2
17+
with:
18+
path: |
19+
node_modules
20+
*/*/node_modules
21+
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
22+
- name: Install
23+
run: yarn install
24+
- name: Build
25+
run: yarn build
26+
- name: Archive production artifacts
27+
uses: actions/upload-artifact@v2
28+
with:
29+
name: build
30+
path: |
31+
${{ github.workspace }}/packages/**/build
32+
${{ github.workspace }}/packages/**/dist
33+
${{ github.workspace }}/packages/**/esm
34+
35+
job_size_check:
36+
name: Size Check
37+
needs: job_build
38+
runs-on: ubuntu-latest
39+
steps:
40+
- uses: actions/checkout@v2
41+
- uses: actions/setup-node@v1
42+
- uses: actions/cache@v2
43+
with:
44+
path: |
45+
node_modules
46+
*/*/node_modules
47+
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
48+
- run: yarn install
49+
- uses: actions/download-artifact@v2
50+
with:
51+
name: build
52+
path: ${{ github.workspace }}/packages
53+
- uses: andresz1/[email protected]
54+
with:
55+
github_token: ${{ secrets.GITHUB_TOKEN }}
56+
build_script: echo "doing nothing"
57+
skip_step: install
58+
59+
job_lint:
60+
name: Lint
61+
needs: job_build
62+
runs-on: ubuntu-latest
63+
steps:
64+
- uses: actions/checkout@v2
65+
- uses: actions/setup-node@v1
66+
- uses: actions/cache@v2
67+
with:
68+
path: |
69+
node_modules
70+
*/*/node_modules
71+
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
72+
- run: yarn install
73+
- uses: actions/download-artifact@v2
74+
with:
75+
name: build
76+
path: ${{ github.workspace }}/packages
77+
- name: Run Linter
78+
run: yarn lint
79+
80+
job_unit_test:
81+
name: Test
82+
needs: job_build
83+
runs-on: ubuntu-latest
84+
steps:
85+
- uses: actions/checkout@v2
86+
- uses: actions/setup-node@v1
87+
- uses: actions/cache@v2
88+
with:
89+
path: |
90+
node_modules
91+
*/*/node_modules
92+
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
93+
- run: yarn install
94+
- uses: actions/download-artifact@v2
95+
with:
96+
name: build
97+
path: ${{ github.workspace }}/packages
98+
- name: Unit Tests
99+
run: yarn test

.github/workflows/size-limit.yml

Lines changed: 0 additions & 16 deletions
This file was deleted.

.size-limit.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ module.exports = [
99
name: '@sentry/browser - Webpack',
1010
path: 'packages/browser/esm/index.js',
1111
import: '{ init }',
12-
limit: '18 KB',
12+
limit: '19 KB',
1313
},
1414
{
1515
name: '@sentry/react - Webpack',

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
],
3636
"devDependencies": {
3737
"@google-cloud/storage": "^2.5.0",
38-
"@size-limit/preset-big-lib": "^4.5.5",
38+
"@size-limit/preset-small-lib": "^4.5.5",
3939
"@strictsoftware/typedoc-plugin-monorepo": "^0.2.1",
4040
"@types/chai": "^4.1.3",
4141
"@types/jest": "^24.0.11",

0 commit comments

Comments
 (0)