Skip to content
This repository was archived by the owner on Oct 30, 2024. It is now read-only.

Commit 83c1b1a

Browse files
authored
Merge pull request #159 from ethereumjs/ci-separate-browser-run
ci: separate browser test to own actions run
2 parents 2bc21b4 + 0a9899b commit 83c1b1a

File tree

2 files changed

+18
-9
lines changed

2 files changed

+18
-9
lines changed

.github/workflows/build.yml

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,22 +12,30 @@ jobs:
1212
runs-on: ubuntu-latest
1313
strategy:
1414
matrix:
15-
node-version: [12.x, 13.x, 14.x, 16.x]
15+
node-version: [12, 13, 14, 16]
1616
steps:
1717
- uses: actions/checkout@v2
18-
1918
- name: Use Node.js ${{ matrix.node-version }}
2019
uses: actions/setup-node@v2
2120
with:
2221
node-version: ${{ matrix.node-version }}
2322
cache: 'npm'
24-
25-
- run: npm install
26-
- run: npm run coverage
27-
- run: npm run test:browser
28-
23+
- run: npm i
24+
- run: npm run lint
25+
- run: npm run coverage
2926
- name: Upload coverage to Coveralls
3027
uses: coverallsapp/github-action@master
3128
with:
3229
github-token: ${{ secrets.GITHUB_TOKEN }}
33-
30+
if: ${{ matrix.node-version == 12 }}
31+
test-browser:
32+
runs-on: ubuntu-latest
33+
steps:
34+
- uses: actions/checkout@v2
35+
- name: Use Node.js 12
36+
uses: actions/setup-node@v2
37+
with:
38+
node-version: 12
39+
cache: 'npm'
40+
- run: npm i
41+
- run: npm run test:browser

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,15 @@
1111
"dist.browser"
1212
],
1313
"scripts": {
14+
"postinstall": "npm run build",
1415
"build": "tsc -p ./tsconfig.prod.json && tsc -p tsconfig.browser.json",
1516
"prepublishOnly": "npm run lint && npm run build && npm run test",
1617
"docs:build": "typedoc --out docs --mode file --readme none --theme markdown --mdEngine github --excludeNotExported src",
1718
"coverage": "npm run build && nyc --reporter=lcov npm run test:unit",
1819
"tsc": "tsc -p ./tsconfig.prod.json --noEmit",
1920
"lint": "ethereumjs-config-lint",
2021
"lint:fix": "ethereumjs-config-lint-fix",
21-
"test": "npm run lint && npm run build && npm run test:unit && npm run test:browser",
22+
"test": "npm run test:unit && npm run test:browser",
2223
"test:unit": "mocha --require ts-node/register ./test/**/*.ts",
2324
"test:browser": "karma start karma.conf.js"
2425
},

0 commit comments

Comments
 (0)