Skip to content

js CI

js CI #291

Workflow file for this run

name: js CI
on:
push:
paths:
- 'js/**'
- '.github/workflows/js**'
pull_request:
paths:
- 'js/**'
- '.github/workflows/js**'
schedule:
# weekly build every FRI
- cron: "0 6 * * 5"
jobs:
matrix_build:
runs-on: ${{ matrix.operating-system }}
strategy:
matrix:
operating-system: [ ubuntu-latest ]
#TODO
# , macOS-latest, windows-latest
node-version: [10.x, 12.x, 14.x, 16.x, 18.x]
include:
- node-version: 18.x
node-test: enabled
name: Node.js ${{ matrix.node-version }} Build on ${{ matrix.operating-system }}
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: jasmine-node
working-directory: js/jasmine-node
run: |
npm ci
npm run build --if-present
npm test
env:
CI: true
- name: jest-tests
working-directory: js/jest-tests
run: |
npm ci
npm run build --if-present
npm test -t ES6Class
env:
CI: true
- name: mocha-tests
working-directory: js/mocha-tests
run: |
npm ci
npm run build --if-present
npm test
env:
CI: true
- name: node-test
if: matrix.node-test == 'enabled'
working-directory: js/node-test
run: |
npm test
# assure one failing test
sh ../../.scripts/assure_failing_test.sh 'node test/HelloWorld.test.js' 'fail 1'