Update README #3
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: | |
- main | |
paths-ignore: | |
- "**/README.md" | |
pull_request: | |
branches: | |
- main | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
test-coverage: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: latest | |
cache: npm | |
- run: npm install --no-save express express-validator celebrate koa | |
- run: npm ci | |
- run: npm test -- --collectCoverage | |
- name: Upload coverage report to Codecov | |
uses: codecov/codecov-action@v3 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
directory: ./coverage/ | |
test-matrix: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
node: ["18", "20", "latest"] | |
deps: | |
- [email protected] express-validator celebrate | |
- [email protected] express-validator celebrate | |
- [email protected] | |
- [email protected] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: "${{ matrix.node }}" | |
cache: npm | |
- run: npm install --no-save ${{ matrix.deps }} | |
- run: npm ci | |
- run: npm test -- tests/express | |
if: contains(matrix.deps, 'express') | |
- run: npm test -- tests/koa | |
if: contains(matrix.deps, 'koa') |