Skip to content

Up CHANGELOG and tweak README (#295) #218

Up CHANGELOG and tweak README (#295)

Up CHANGELOG and tweak README (#295) #218

Workflow file for this run

name: CI
# Automatically runs tests on pull OR push to master.
#
# Runs over a matrix of Node and TypeScript versions.
# Does *not* deploy to npm.
on:
push:
branches:
- master
pull_request:
branches:
- master
workflow_call: # allow this workflow to be called from other workflows
workflow_dispatch: # allow manual execution, in case for example a run was cancelled
jobs:
build:
environment: prod
runs-on: ubuntu-latest
strategy:
matrix:
node_version: [10.x, 12.x, 14.x, 16.x, 18.x]
# TODO - add 20.x when it is released
typescript_version: [4]
# To avoid too many builds, only test for extra TypeScript versions, for a subset of the Node versions:
include:
- node_version: 14.x
typescript_version: 3
# the 'deploy' config, with deliberately older TypeScript version:
- node_version: 14.x
typescript_version: 4.0.5
- node_version: 16.x
typescript_version: 3
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node_version }} and TypeScript ${{ matrix.typescript_version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node_version }}
registry-url: 'https://registry.npmjs.org'
# npm ci - for a clean install, fails safe
- run: npm ci
- run: npm install --development typescript@${{ matrix.typescript_version }}
- run: npm test
# - name: Report Code Coverage
# if: matrix.node_version == '16.x' && matrix.typescript_version == 4
# run: npm run report-coverage-to-coveralls