Skip to content

chore: fix ci

chore: fix ci #24

name: Continuous Integration
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
permissions: {}
env:
NODE_OPTIONS: --max-old-space-size=4096
jobs:
test:
name: Test
timeout-minutes: 30
strategy:
matrix:
os: [ubuntu-latest]
node-version: [20, 22, 24]
fail-fast: false
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Set up Docker
uses: docker/setup-buildx-action@v3
- name: Start DB2 container
run: |
docker run -d --name db2 -e ACCEPT_EULA=TRUE -p 60000:50000 -v db2data:/db2data ibmcom/db2
- name: Wait for DB2 to be ready
run: sleep 200
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
- run: docker logs -f db2
- name: Run test
run: npm test --ignore-scripts
code-lint:
name: Code Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22 # LTS
- run: npm ci --ignore-scripts
- name: Verify code linting
run: npx --no eslint .
commit-lint:
name: Commit Lint
runs-on: ubuntu-latest
if: ${{ github.event.pull_request }}
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version: 22 # LTS
- name: Install dependencies
run: npm ci
- name: Verify commit linting
run: npx commitlint --from origin/master --to HEAD --verbose