Skip to content

Commit

Permalink
Merge pull request #159 from ethereumjs/ci-separate-browser-run
Browse files Browse the repository at this point in the history
ci: separate browser test to own actions run
  • Loading branch information
holgerd77 authored Oct 25, 2021
2 parents 2bc21b4 + 0a9899b commit 83c1b1a
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 9 deletions.
24 changes: 16 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,30 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [12.x, 13.x, 14.x, 16.x]
node-version: [12, 13, 14, 16]
steps:
- uses: actions/checkout@v2

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'

- run: npm install
- run: npm run coverage
- run: npm run test:browser

- run: npm i
- run: npm run lint
- run: npm run coverage
- name: Upload coverage to Coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}

if: ${{ matrix.node-version == 12 }}
test-browser:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js 12
uses: actions/setup-node@v2
with:
node-version: 12
cache: 'npm'
- run: npm i
- run: npm run test:browser
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,15 @@
"dist.browser"
],
"scripts": {
"postinstall": "npm run build",
"build": "tsc -p ./tsconfig.prod.json && tsc -p tsconfig.browser.json",
"prepublishOnly": "npm run lint && npm run build && npm run test",
"docs:build": "typedoc --out docs --mode file --readme none --theme markdown --mdEngine github --excludeNotExported src",
"coverage": "npm run build && nyc --reporter=lcov npm run test:unit",
"tsc": "tsc -p ./tsconfig.prod.json --noEmit",
"lint": "ethereumjs-config-lint",
"lint:fix": "ethereumjs-config-lint-fix",
"test": "npm run lint && npm run build && npm run test:unit && npm run test:browser",
"test": "npm run test:unit && npm run test:browser",
"test:unit": "mocha --require ts-node/register ./test/**/*.ts",
"test:browser": "karma start karma.conf.js"
},
Expand Down

0 comments on commit 83c1b1a

Please sign in to comment.