Refactor: eliminate TypeScript "as" keyword #2753
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs | |
# https://hanxiao.io/2021/01/24/Speedup-CI-Workflow-in-Github-Actions-via-Strategy-Matrix/ | |
name: Project CI | |
# TODO(cemmer): test README help message | |
on: | |
pull_request: | |
types: | |
# - edited # PR's base branch was changed | |
- opened | |
- reopened | |
- synchronize # PR's branch was edited (i.e. new commits) | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
node-lint: | |
runs-on: ubuntu-latest | |
steps: | |
# Setup and install | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version-file: '.nvmrc' | |
cache: 'npm' | |
- run: npm ci | |
# Lint the source files | |
- run: ./node_modules/.bin/ts-node ./index.ts --help | |
- run: npm run lint | |
# TODO(cemmer): check for deprecated dependencies | |
# https://stackoverflow.com/questions/44097267/find-packages-that-give-deprecated-warning-npm | |
node-unit: | |
runs-on: ${{ matrix.os }}-latest | |
strategy: | |
matrix: | |
os: [ ubuntu, macos, windows ] | |
node-version: [ lts/*, lts/-1, 14.18.0 ] | |
steps: | |
# Setup and install | |
- uses: actions/checkout@v3 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: 'npm' | |
- run: npm ci | |
# Test the source files | |
- run: npm run test:unit | |
node-e2e: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [ lts/*, lts/-1, 14.18.0 ] | |
steps: | |
# Setup and install | |
- uses: actions/checkout@v3 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: 'npm' | |
- run: npm ci | |
# Test the built files | |
- run: npm run build | |
- run: ./test/endToEndTest.sh | |
node-package: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [ lts/*, lts/-1, 14.18.0 ] | |
steps: | |
# Setup and install | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: 'npm' | |
- run: npm ci | |
# Test the packaging | |
- run: | | |
npm pack | |
tar -xvzf igir-*.tgz | |
cd package | |
npm install --ignore-scripts | |
./build/index.js --help | |
cd .. | |
rm -rf package | |
renovate-lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: rinchsan/[email protected] | |
with: | |
pattern: 'renovate.json5' | |
# !!! This check should be required by GitHub !!! | |
test-status-check: | |
if: always() | |
needs: | |
- node-lint | |
- node-unit | |
- node-e2e | |
- node-package | |
- renovate-lint | |
runs-on: ubuntu-latest | |
steps: | |
- uses: re-actors/alls-green@release/v1 | |
with: | |
jobs: ${{ toJSON(needs) }} |