Update JavaScript dev dependencies #87
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
name: Tests | |
on: | |
push: | |
paths-ignore: | |
- .gitignore | |
- LICENSE | |
- README.md | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
check-pre-commit: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: "3.12" | |
- uses: pre-commit/[email protected] | |
test-coverage: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: latest | |
cache: npm | |
- name: Install dependencies | |
run: npm ci | |
- name: Run checks | |
run: npm run check | |
- name: Run tests with coverage | |
run: npm test | |
- name: Upload coverage report to Codecov | |
uses: codecov/codecov-action@v4 | |
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] | |
- [email protected] | |
- fastify@4 fastify-plugin@4 | |
- fastify@3 fastify-plugin@3 | |
- [email protected] | |
- [email protected] | |
- "@nestjs/core@10 @nestjs/common@10 @nestjs/platform-express@10 @nestjs/testing@10" | |
- "@nestjs/core@9 @nestjs/common@9 @nestjs/platform-express@9 @nestjs/testing@9" | |
- "@nestjs/core@8 @nestjs/common@8 @nestjs/platform-express@8 @nestjs/testing@8" | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: "${{ matrix.node }}" | |
cache: npm | |
- name: Install dependencies | |
run: npm ci | |
- name: Override dependencies from matrix | |
run: npm install --no-save ${{ matrix.deps }} | |
- name: Run tests for Express | |
run: npm test -- tests/express | |
if: contains(matrix.deps, 'express') | |
- name: Run tests for Fastify | |
run: npm test -- tests/fastify | |
if: contains(matrix.deps, 'fastify') | |
- name: Run tests for Koa | |
run: npm test -- tests/koa | |
if: contains(matrix.deps, 'koa') | |
- name: Run tests for NestJS | |
run: npm test -- tests/nestjs | |
if: contains(matrix.deps, 'nestjs') |