Skip to content

test: vendor conformance suite 1.0.0 #30

test: vendor conformance suite 1.0.0

test: vendor conformance suite 1.0.0 #30

Workflow file for this run

name: CI
on:
push:
branches: [ main ]
pull_request:
permissions:
contents: read
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node: [ "18", "20", "22", "24" ]
steps:
- uses: actions/checkout@v5
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
cache: npm
- run: npm ci
- name: Build
run: npm run build
- name: Typecheck
run: npm run typecheck
- name: Test
run: npm test
lint:
name: Static analysis (ESLint)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: actions/setup-node@v4
with:
node-version: "22"
cache: npm
- run: npm ci
- name: ESLint
run: npm run lint
coverage:
name: Coverage gate (>=90% lines)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: actions/setup-node@v4
with:
node-version: "22"
cache: npm
- run: npm ci
# Build first: the nestjs tests import the built @babelqueue/bullmq workspace
# package (now linked locally via the ^1.0.0 dependency), so its dist/ must exist.
- name: Build
run: npm run build
- name: Coverage
run: npm run coverage
conformance:
name: Conformance suite in sync
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Verify vendored conformance matches the canonical suite
# @babelqueue/sqs, @babelqueue/azure-service-bus, @babelqueue/pulsar, @babelqueue/kafka,
# @babelqueue/artemis, @babelqueue/redis and @babelqueue/rabbitmq each vendor the conformance
# suite (for their binding tests); guard every copy against drift.
run: |
git clone --depth 1 https://github.com/BabelQueue/conformance.git "$RUNNER_TEMP/conformance"
for pkg in sqs azure-service-bus pulsar kafka artemis redis rabbitmq; do
diff -ru "$RUNNER_TEMP/conformance/manifest.json" "packages/$pkg/test/conformance/manifest.json"
diff -ru "$RUNNER_TEMP/conformance/fixtures" "packages/$pkg/test/conformance/fixtures"
diff -ru "$RUNNER_TEMP/conformance/schema" "packages/$pkg/test/conformance/schema"
done
echo "Vendored conformance is in sync with the canonical suite."
ci-green:
name: CI green
runs-on: ubuntu-latest
needs: [test, lint, coverage, conformance]
if: ${{ always() }}
steps:
- name: Fail if any required job did not pass
run: |
if ${{ contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') }}; then
echo "A required job failed or was cancelled."
exit 1
fi