chore(deps-dev): bump @types/node from 20.19.13 to 24.8.1 #58
Workflow file for this run
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: CI/CD Pipeline | |
| on: | |
| push: | |
| branches: [ main, develop ] | |
| pull_request: | |
| branches: [ main, develop ] | |
| release: | |
| types: [ published ] | |
| permissions: | |
| contents: read | |
| pull-requests: write | |
| issues: write | |
| jobs: | |
| test: | |
| name: Test Suite | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| node-version: [18.x, 20.x, 22.x] | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js ${{ matrix.node-version }} | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| cache: 'npm' | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Debug environment | |
| run: | | |
| echo "Node.js version: $(node --version)" | |
| echo "NPM version: $(npm --version)" | |
| echo "Available memory: $(free -h)" | |
| echo "Disk space: $(df -h)" | |
| echo "CPU info: $(nproc) cores" | |
| echo "Environment: $NODE_ENV" | |
| - name: Set environment variables | |
| run: | | |
| echo "NODE_ENV=test" >> $GITHUB_ENV | |
| echo "CI=true" >> $GITHUB_ENV | |
| echo "JEST_TIMEOUT=30000" >> $GITHUB_ENV | |
| - name: Run linting | |
| run: npm run lint | |
| - name: Run type checking | |
| run: npx tsc --noEmit | |
| - name: Run tests | |
| run: | | |
| echo "Starting tests..." | |
| npm test -- --verbose --detectOpenHandles | |
| timeout-minutes: 15 | |
| - name: Run test coverage | |
| run: | | |
| echo "Starting coverage tests..." | |
| npm run test:coverage -- --verbose --detectOpenHandles | |
| timeout-minutes: 15 | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@v4 | |
| with: | |
| file: ./coverage/lcov.info | |
| flags: unittests | |
| name: codecov-umbrella | |
| fail_ci_if_error: false | |
| build: | |
| name: Build Package | |
| 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.x' | |
| cache: 'npm' | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Build package | |
| run: npm run build | |
| - name: Check build artifacts | |
| run: | | |
| ls -la dist/ | |
| test -f dist/index.js | |
| test -f dist/index.d.ts | |
| test -f dist/BoltDriverAPI.js | |
| test -f dist/BoltDriverAPI.d.ts | |
| - name: Upload build artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: dist-files | |
| path: dist/ | |
| security: | |
| name: Security Audit | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20.x' | |
| cache: 'npm' | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Run security audit | |
| run: npm audit --audit-level=moderate | |
| - name: Run dependency check | |
| run: npx audit-ci --config audit-ci.json | |
| publish: | |
| name: Publish to NPM | |
| runs-on: ubuntu-latest | |
| needs: [test, build, security] | |
| if: github.event_name == 'release' && github.event.action == 'published' | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20.x' | |
| cache: 'npm' | |
| registry-url: 'https://registry.npmjs.org' | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Build package | |
| run: npm run build | |
| - name: Publish to NPM | |
| run: npm publish | |
| env: | |
| NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
| - name: Verify publication | |
| run: | | |
| sleep 10 | |
| npm view bolt-driver-api@${{ github.event.release.tag_name }} | |
| examples: | |
| name: Test Examples | |
| runs-on: ubuntu-latest | |
| needs: build | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20.x' | |
| cache: 'npm' | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Build package | |
| run: npm run build | |
| - name: Test examples (dry run) | |
| run: | | |
| # Test that examples can be imported without errors | |
| node -e " | |
| try { | |
| const { BoltDriverAPI } = require('./dist/index.js'); | |
| console.log('✅ Main export works'); | |
| } catch (e) { | |
| console.error('❌ Main export failed:', e.message); | |
| process.exit(1); | |
| } | |
| " | |
| - name: Test TypeScript compilation of examples | |
| run: | | |
| npx tsc --noEmit examples/*.ts | |
| echo "✅ All examples compile successfully" |