Skip to content

chore(deps): update codecov/codecov-action action to v5 (#59) #286

chore(deps): update codecov/codecov-action action to v5 (#59)

chore(deps): update codecov/codecov-action action to v5 (#59) #286

Workflow file for this run

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]
check-attw:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22.4.x
cache: npm
- name: Install dependencies
run: npm ci
- name: Build package
run: npm run build
- name: Check if types are wrong with attw
run: npx -p @arethetypeswrong/cli attw --pack .
test-coverage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22.4.x
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@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
directory: ./coverage/
test-matrix:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node: ["18", "20", "22.4.x"]
deps:
- [email protected]
- [email protected]
- [email protected]
- fastify@5 fastify-plugin@5
- fastify@4 fastify-plugin@4
- fastify@3 fastify-plugin@3
- [email protected]
- [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"
- [email protected]
- [email protected]
- [email protected]
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')
- name: Run tests for Hono
run: npm test -- tests/hono
if: contains(matrix.deps, 'hono')