Skip to content

fix: moved this.reset() to a finally block to guarantee cleanup e… #37

fix: moved this.reset() to a finally block to guarantee cleanup e…

fix: moved this.reset() to a finally block to guarantee cleanup e… #37

Workflow file for this run

name: CI
on:
push:
branches: [main, next]
pull_request:
branches: [main, next]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
name: Test (Node ${{ matrix.node-version }})
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18, 20, 22, 23, 24]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Run linting
run: npm run lint
- name: Run type checking
run: npm run type-check
- name: Run tests
run: npm run test:coverage
# - name: Upload coverage to Codecov
# if: matrix.node-version == 20
# uses: codecov/codecov-action@v4
# with:
# token: ${{ secrets.CODECOV_TOKEN }}
# file: ./coverage/lcov.info
# fail_ci_if_error: true
build:
name: Build
runs-on: ubuntu-latest
needs: test
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Build package
run: npm run build
- name: Check build output
run: |
if [ ! -d "dist" ]; then
echo "Build output directory 'dist' not found"
exit 1
fi
- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: build-artifacts
path: dist/
retention-days: 7