Merge pull request #326 from leaonline/dependabot/npm_and_yarn/rollup… #547
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: Test suite | |
on: | |
push: | |
branches: | |
- master | |
- development | |
pull_request: # runs on all PR | |
jobs: | |
unittest: | |
name: unit tests | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node: [16, 18, 20] | |
steps: | |
- name: Checkout ${{ matrix.node }} | |
uses: actions/checkout@v3 | |
- name: Setup node ${{ matrix.node }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node }} | |
- name: Cache dependencies ${{ matrix.node }} | |
uses: actions/cache@v3 | |
with: | |
path: ~/.npm | |
key: ${{ runner.os }}-node-${{ matrix.node }}-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-node-${{ matrix.node }} | |
- run: npm ci | |
- run: npm run lint | |
- run: npm run test:coverage |