Skip to content

chore(deps-dev): bump @types/bull from 3.15.9 to 4.10.4 #434

chore(deps-dev): bump @types/bull from 3.15.9 to 4.10.4

chore(deps-dev): bump @types/bull from 3.15.9 to 4.10.4 #434

Workflow file for this run

name: CI
on:
push:
branches: [ main, develop ]
pull_request:
branches: [ main, develop ]
permissions:
contents: read
jobs:
test:
name: Test on Node.js ${{ matrix.node-version }} and ${{ matrix.os }}
runs-on: ${{ matrix.os }}
environment: Default
strategy:
matrix:
include:
# Minimum supported version
- node-version: '18.x'
os: ubuntu-latest
# LTS version (most important)
- node-version: '20.x'
os: ubuntu-latest
# Latest version
- node-version: '22.x'
os: ubuntu-latest
# Test LTS version on Windows (common development environment)
- node-version: '20.x'
os: windows-latest
steps:
- name: Checkout code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0
- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Verify the integrity of provenance attestations and registry signatures
run: npm audit signatures
- name: Run linting
run: npm run lint --if-present
- name: Run unit tests
run: npm run test:unit
env:
NODE_OPTIONS: --max-old-space-size=4096
- name: Detect integration secrets
id: detect-secrets
shell: bash
env:
AUTOTASK_USERNAME: ${{ secrets.AUTOTASK_USERNAME }}
AUTOTASK_INTEGRATION_CODE: ${{ secrets.AUTOTASK_INTEGRATION_CODE }}
AUTOTASK_SECRET: ${{ secrets.AUTOTASK_SECRET }}
run: |
if [ -z "$AUTOTASK_USERNAME" ] || [ -z "$AUTOTASK_SECRET" ] || [ -z "$AUTOTASK_INTEGRATION_CODE" ]; then
echo "HAS_AUTOTASK_SECRETS=false" >> "$GITHUB_ENV"
echo "::notice::Skipping integration tests — Autotask secrets not configured for this run"
elif node scripts/check-integration-connectivity.js; then
echo "HAS_AUTOTASK_SECRETS=true" >> "$GITHUB_ENV"
else
echo "HAS_AUTOTASK_SECRETS=false" >> "$GITHUB_ENV"
echo "::notice::Skipping integration tests — Autotask credentials present but the API is not reachable with them"
fi
- name: Run integration tests
# Skip when secrets are unavailable (forks, dependabot PRs) or when
# the credentials cannot reach a working Autotask API.
if: ${{ env.HAS_AUTOTASK_SECRETS == 'true' }}
env:
NODE_OPTIONS: --max-old-space-size=4096
AUTOTASK_USERNAME: ${{ secrets.AUTOTASK_USERNAME }}
AUTOTASK_INTEGRATION_CODE: ${{ secrets.AUTOTASK_INTEGRATION_CODE }}
AUTOTASK_SECRET: ${{ secrets.AUTOTASK_SECRET }}
TEST_ACCOUNT_ID: ${{ secrets.TEST_ACCOUNT_ID }}
TEST_CONTACT_ID: ${{ secrets.TEST_CONTACT_ID }}
TEST_PROJECT_ID: ${{ secrets.TEST_PROJECT_ID }}
run: npm run test:integration
- name: Build project
run: npm run build --if-present
coverage:
name: Code Coverage
runs-on: ubuntu-latest
environment: Default
steps:
- name: Checkout code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Setup Node.js
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: '20.x'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Run tests with coverage
run: npm run test:coverage --if-present || npm run test:unit
env:
NODE_OPTIONS: --max-old-space-size=4096
- name: Upload coverage to Codecov
uses: codecov/codecov-action@e79a6962e0d4c0c17b229090214935d2e33f8354 # v6.0.1
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage/lcov.info
flags: unittests
name: codecov-umbrella
fail_ci_if_error: false