docs(README): avoid whitespaces because Github is not underlining links #42
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
name: Run tests | |
on: | |
push: | |
branches: | |
- '**' | |
tags-ignore: | |
- '**' | |
pull_request: | |
workflow_call: | |
workflow_dispatch: | |
concurrency: | |
group: run-tests-group-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
ci_tests: | |
name: Tests on ${{ matrix.os }} node${{ matrix.node }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
node: [18, 20] | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v3 | |
- name: Setup node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node }} | |
registry-url: https://registry.npmjs.org/ | |
cache: npm | |
# https://github.com/actions/setup-node/issues/411 | |
# https://github.com/npm/cli/issues/4341 | |
- name: Workaround for npm installation on Windows | |
if: ${{ matrix.os == 'windows-latest' }} | |
run: npm install -g npm@8.3.1 | |
- name: Install latest npm | |
run: npm install -g npm@latest | |
- name: Cache .angular and node_modules | |
uses: actions/cache@v3 | |
id: cache-step | |
with: | |
key: cache-${{ matrix.os }}-node${{ matrix.node }}-${{ hashFiles('package-lock.json') }} | |
restore-keys: | | |
cache-${{ matrix.os }}-node${{ matrix.node }}- | |
path: | | |
.angular/cache | |
node_modules | |
- name: Install dependencies | |
if: steps.cache-step.outputs.cache-hit != 'true' | |
run: npm clean-install --engine-strict | |
- name: Test | |
run: npm run test |