Skip to content

chore(release): publish 2.2.0 #91

chore(release): publish 2.2.0

chore(release): publish 2.2.0 #91

Workflow file for this run

name: Test
on:
push:
paths-ignore:
- '**.md'
pull_request:
paths-ignore:
- '**.md'
jobs:
test:
name: Test ${{ matrix.package }} (Node ${{ matrix.node-version }})
env:
CI: true
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18, 20]
package: [koam-core, koam-router]
include:
- node-version: 18
codecov: true
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
with:
version: latest
run_install: false
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: pnpm
- name: Install dependencies
run: pnpm install
- name: Build packages
run: pnpm --filter=${{ matrix.package }}... build
- name: TypeScript check
run: pnpm --filter=${{ matrix.package }} type-check
- name: Eslint check
run: pnpm --filter=${{ matrix.package }} exec eslint
continue-on-error: true
- name: Unit test
run: pnpm --filter=${{ matrix.package }} test
- name: Fix coverage relative path
run: sed -i 's/SF:/SF:packages\/${{ matrix.package }}\//' packages/${{ matrix.package }}/coverage/lcov.info
- name: Update coverage report
if: ${{ matrix.codecov }}
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: ${{ matrix.package }}
files: packages/${{ matrix.package }}/coverage/lcov.info