Merge pull request #186 from jasonraimondi/fix-182-add-missing-parame… #680
This file contains hidden or 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: build and test | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
check_versions: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- run: | | |
jsr_version=$(jq -r '.version' jsr.json) | |
pkg_version=$(jq -r '.version' package.json) | |
if [[ "$jsr_version" != "$pkg_version" ]]; then | |
echo "Version Mismatch" | |
echo "JSR: $jsr_version" | |
echo "Node: $pkg_version" | |
exit 1 | |
fi | |
build: | |
runs-on: ubuntu-latest | |
needs: [check_versions] | |
strategy: | |
matrix: | |
node-version: [ 20.x, 22.x, 24.x ] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: pnpm/action-setup@v4 | |
with: | |
version: 10 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: pnpm | |
cache-dependency-path: pnpm-lock.yaml | |
- run: pnpm install --frozen-lockfile --production false | |
- run: pnpm test:cov | |
env: | |
CI: true | |
DOMAIN: localhost | |
JWT_SECRET: testing-access-token-secret | |
- name: Upload coverage reports to Codecov | |
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' && matrix.node-version == '20.x' }} | |
uses: codecov/codecov-action@v5 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} |