Merge pull request #190 from hildjj/update-web #175
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: Tests | |
on: | |
push: | |
branches: [master, main] | |
pull_request: | |
branches: [master, main] | |
jobs: | |
build: | |
strategy: | |
matrix: | |
node-version: [16.x, 18.x, 20.x] | |
platform: [ubuntu-20.04, windows-latest] | |
runs-on: ${{ matrix.platform }} | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Cache pnpm modules | |
uses: actions/cache@v3 | |
env: | |
cache-name: cache-pnpm-modules | |
with: | |
# pnpm cache files are stored in `~/.pnpm-store` on Linux/macOS | |
path: ~/.pnpm-store | |
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.node-version }}-${{ hashFiles('**/package.json') }} | |
restore-keys: | | |
${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.node-version }}- | |
- name: Install pnpm | |
uses: pnpm/action-setup@v2 | |
with: | |
version: 8.5.0 | |
run_install: | | |
- recursive: true | |
args: [--filter, '!*-demo', --filter, '!cbor-web'] | |
- name: Test ${{ matrix.node-version }} | |
run: npm run coverage | |
- name: Coveralls Parallel | |
uses: coverallsapp/github-action@master | |
with: | |
github-token: ${{ secrets.github_token }} | |
flag-name: node-${{ matrix.node-version }} | |
parallel: true | |
finish: | |
needs: build | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Coveralls Finished | |
uses: coverallsapp/github-action@master | |
with: | |
github-token: ${{ secrets.github_token }} | |
parallel-finished: true |