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

ci: separate browser test to own actions run #159

Merged
merged 1 commit into from
Oct 25, 2021
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
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