Skip to content

Commit

Permalink
ci: Split examples and unit/integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
bertschneider committed Oct 31, 2023
1 parent 5f0917b commit 53c82c8
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 5 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/run-all-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,31 @@ jobs:
run: npm run build --workspace=@jazzer.js/fuzzer
- name: run all tests
run: npm run test
examples:
name: examples
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04, windows-2019, macos-11]
steps:
- name: checkout
uses: actions/checkout@v3
- name: node
uses: actions/setup-node@v3
with:
node-version: 16
cache: "npm"
- name: MSVC (windows)
uses: ilammy/msvc-dev-cmd@v1
if: contains(matrix.os, 'windows')
- name: install dependencies
run: npm install
- name: build project
run: npm run build
- name: build fuzzer
run: npm run build --workspace=@jazzer.js/fuzzer
- name: run all examples
run: npm run example
fuzz_tests:
name: fuzz tests
runs-on: ubuntu-20.04
Expand Down Expand Up @@ -99,6 +124,7 @@ jobs:
needs:
- linting
- unit_tests
- examples
- fuzz_tests
- end-to-end
permissions:
Expand Down
13 changes: 8 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,15 @@
"clean": "rimraf -g **/node_modules **/tests/**/package-lock.json **/examples/**/package-lock.json **/dist **/coverage packages/fuzzer/build packages/fuzzer/prebuilds",
"compile:watch": "tsc -b tsconfig.build.json --incremental --pretty --watch",
"test": "run-script-os",
"test:jest": "jest && npm run test --ws --if-present",
"test:coverage": "jest --coverage",
"test:default": "npm run test:jest",
"test:linux:darwin": "npm run test:jest && cd examples && sh ../scripts/run_all.sh dryRun && cd ../tests && sh ../scripts/run_all.sh fuzz",
"test:win32": "npm run test:jest && cd examples && ..\\scripts\\run_all.bat dryRun && cd ..\\tests && ..\\scripts\\run_all.bat fuzz",
"test:watch": "jest --watch",
"test:linux:darwin": "npm run test:jest && cd tests && sh ../scripts/run_all.sh fuzz",
"test:win32": "npm run test:jest && cd tests && ..\\scripts\\run_all.bat fuzz",
"test:jest": "jest && npm run test --ws --if-present",
"test:jest:coverage": "jest --coverage",
"test:jest:watch": "jest --watch",
"example": "run-script-os",
"example:linux:darwin": "cd examples && sh ../scripts/run_all.sh dryRun",
"example:win32": "cd examples && ..\\scripts\\run_all.bat dryRun",
"lint": "eslint . && npm run lint --ws --if-present",
"lint:fix": "eslint . --fix && npm run lint:fix --ws --if-present",
"format": "prettier --check . && npm run format --ws --if-present",
Expand Down

0 comments on commit 53c82c8

Please sign in to comment.