Skip to content

Consolidate CI workflows #20

Consolidate CI workflows

Consolidate CI workflows #20

Workflow file for this run

name: CI
on:
pull_request:
branches: [ main, prod-beta, prod-stable, stage-beta, stage-stable ]
push:
branches: [ main, prod-beta, prod-stable, stage-beta, stage-stable ]
env:
BRANCH: ${{ github.base_ref }}
jobs:
unit:
name: Units - Node.js ${{ strategy.matrix.node-version }}
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18]
steps:
- uses: ./.github/workflows/setup.yml
with:
node-version: ${{ matrix.node-version }}
- name: Test
run: npm test -- --collect-coverage --max-workers=4
- name: Upload coverage report
if: ${{ success() }}
uses: codecov/codecov-action@v4.2.0
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
directory: coverage
plugin: pycoverage # Only run one plugin so that all do not run. There is no way to disable plugins entirely.
build:
name: Build - Node.js ${{ strategy.matrix.node-version }}
runs-on: ubuntu-latest
if: ${{ github.event_name == 'push' }}
strategy:
matrix:
node-version: [18]
steps:
- uses: ./.github/workflows/setup.yml
with:
node-version: ${{ matrix.node-version }}
- name: Build
run: npm run build
lint:
name: Lint - Node.js ${{ strategy.matrix.node-version }}
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18]
steps:
- uses: ./.github/workflows/setup.yml
with:
node-version: ${{ matrix.node-version }}
- name: Lint
run: npm run lint