The github actions were previously ran with Node 20, this bumps them to Node 22. README was also updated to reflect currently used version of Node.
51 lines
1.2 KiB
YAML
51 lines
1.2 KiB
YAML
name: Unit Tests
|
|
|
|
on:
|
|
pull_request:
|
|
branches: [ "main" ]
|
|
push:
|
|
branches: [ "main" ]
|
|
merge_group:
|
|
|
|
# this prevents multiple jobs from the same pr
|
|
# running when new changes are pushed.
|
|
concurrency:
|
|
group: ${{github.workflow}}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
unit-tests:
|
|
name: Service Tests
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Use Node.js 22
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 22
|
|
cache: 'npm'
|
|
- name: Install dependencies
|
|
run: npm ci
|
|
- name: Run unit tests
|
|
run: npm run test:coverage
|
|
- name: Upload coverage to Codecov
|
|
uses: codecov/codecov-action@v4
|
|
with:
|
|
token: ${{ secrets.CODECOV_TOKEN }}
|
|
files: ./coverage/junit.xml
|
|
verbose: true
|
|
|
|
cockpit-unit-tests:
|
|
name: Cockpit Tests
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Use Node.js 22
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 22
|
|
cache: 'npm'
|
|
- name: Install dependencies
|
|
run: npm ci
|
|
- name: Run unit tests with cockpit
|
|
run: npm run test:cockpit
|