Skip to content

docs: Updated compatibility report #4461

docs: Updated compatibility report

docs: Updated compatibility report #4461

Workflow file for this run

name: Node Agent CI
on: [push, pull_request, workflow_dispatch]
env:
# Enable versioned runner quiet mode to make CI output easier to read:
OUTPUT_MODE: quiet
jobs:
should_run:
runs-on: ubuntu-latest
permissions:
pull-requests: read
outputs:
javascript_changed: ${{ steps.filter.output.javascript }}
steps:
- uses: actions/checkout@v4
- uses: dorny/paths-filter@v3
id: filter
with:
filters: |
javascript:
- '**/*.js'
- '**/*.json'
- '**/*.mjs'
- '**/*.cjs'
skip_if_release:
runs-on: ubuntu-latest
outputs:
should_skip: ${{ steps.skip_check.outputs.should_skip }}
steps:
- id: skip_check
uses: fkirc/skip-duplicate-actions@v5
with:
paths_ignore: '["NEWS.md", "changelog.json", "package.json", "package-lock.json"]'
skip_after_successful_duplicate: false
do_not_skip: '["workflow_dispatch", "pull_request"]'
lint:
needs:
- skip_if_release
- should_run
if: needs.skip_if_release.outputs.should_skip != 'true'
|| needs.should_run.outputs.javascript_changed == 'true'
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [lts/*]
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Install Dependencies
run: npm ci
- name: Run Linting
run: npm run lint
- name: Inspect Lockfile
run: npm run lint:lockfile
ci:
needs:
- skip_if_release
- should_run
if: needs.skip_if_release.outputs.should_skip != 'true'
|| needs.should_run.outputs.javascript_changed == 'true'
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node-version: [lts/*]
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Install Dependencies
run: npm ci
- name: Run CI Script Unit Tests
run: npm run unit:scripts
unit:
needs:
- skip_if_release
- should_run
if: needs.skip_if_release.outputs.should_skip != 'true'
|| needs.should_run.outputs.javascript_changed == 'true'
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node-version: [16.x, 18.x, 20.x]
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Install Dependencies
run: npm ci
- name: Run Unit Tests
run: npm run unit
- name: Archive Unit Test Coverage
uses: actions/upload-artifact@v3
with:
name: unit-tests-${{ matrix.node-version }}
path: ./coverage/unit/lcov.info
integration:
needs:
- skip_if_release
- should_run
if: needs.skip_if_release.outputs.should_skip != 'true'
|| needs.should_run.outputs.javascript_changed == 'true'
runs-on: ubuntu-latest
env:
NODE_NO_WARNINGS: 1
strategy:
fail-fast: false
matrix:
node-version: [16.x, 18.x, 20.x]
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Install Dependencies
run: npm ci
- name: Run Docker Services
run: npm run services
- name: Run Integration Tests
run: npm run integration
- name: Run ESM Integration Tests
run: npm run integration:esm
- name: Archive Integration Test Coverage
uses: actions/upload-artifact@v3
with:
name: integration-tests-${{ matrix.node-version }}
path: ./coverage/integration/lcov.info
- name: Archive Integration (ESM) Test Coverage
uses: actions/upload-artifact@v3
with:
name: integration-tests-${{ matrix.node-version }}
path: ./coverage/integration-esm/lcov.info
versioned-internal:
needs:
- skip_if_release
- should_run
if: needs.skip_if_release.outputs.should_skip != 'true'
|| needs.should_run.outputs.javascript_changed == 'true'
runs-on: ${{ github.ref == 'refs/heads/main' && vars.NR_RUNNER || 'ubuntu-latest' }}
strategy:
fail-fast: false
matrix:
node-version: [16.x, 18.x, 20.x]
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Install Dependencies
run: npm ci
- name: Run Docker Services
run: npm run services
- name: Run Versioned Tests
run: TEST_CHILD_TIMEOUT=600000 npm run versioned:internal
env:
VERSIONED_MODE: ${{ github.ref == 'refs/heads/main' && '--minor' || '--major' }}
# Run more jobs when using larger runner, otherwise 2 per CPU seems to be the sweet spot in GHA default runners(July 2022)
JOBS: ${{ github.ref == 'refs/heads/main' && vars.NR_RUNNER && 16 || 4 }}
C8_REPORTER: lcovonly
- name: Archive Versioned Test Coverage
uses: actions/upload-artifact@v3
with:
name: versioned-tests-${{ matrix.node-version }}
path: ./coverage/versioned/lcov.info
- name: Collect docker logs on failure
if: failure()
uses: jwalton/gh-docker-logs@v2
with:
dest: ./logs-${{ matrix.node-version }}
- name: Tar logs
if: failure()
run: tar cvzf ./logs-${{ matrix.node-version }}.tgz ./logs-${{ matrix.node-version }}
- name: Upload logs to GitHub
if: failure()
uses: actions/upload-artifact@master
with:
name: logs-${{ matrix.node-version }}.tgz
path: ./logs-${{ matrix.node-version }}.tgz
# There is no coverage for external as that's tracked in their respective repos
versioned-external:
needs:
- skip_if_release
- should_run
if: needs.skip_if_release.outputs.should_skip != 'true'
|| needs.should_run.outputs.javascript_changed == 'true'
runs-on: ${{ github.ref == 'refs/heads/main' && vars.NR_RUNNER || 'ubuntu-latest' }}
strategy:
fail-fast: false
matrix:
node-version: [16.x, 18.x, 20.x]
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Install Dependencies
run: npm ci
- name: Run Versioned Tests
run: TEST_CHILD_TIMEOUT=600000 npm run versioned:external
env:
VERSIONED_MODE: ${{ github.ref == 'refs/heads/main' && '--minor' || '--major' }}
# Run more jobs when using larger runner, otherwise 2 per CPU seems to be the sweet spot in GHA default runners(July 2022)
JOBS: ${{ github.ref == 'refs/heads/main' && vars.NR_RUNNER && 16 || 4 }}
codecov:
needs: [unit, integration, versioned-internal]
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x, 18.x, 20.x]
steps:
- uses: actions/checkout@v3
- name: Download artifacts
uses: actions/download-artifact@v3
- name: Post Unit Test Coverage
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
directory: unit-tests-${{ matrix.node-version }}
flags: unit-tests-${{ matrix.node-version }}
- name: Post Integration Test Coverage
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
directory: integration-tests-${{ matrix.node-version }}
flags: integration-tests-${{ matrix.node-version }}
- name: Post Versioned Test Coverage
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
directory: versioned-tests-${{ matrix.node-version }}
flags: versioned-tests-${{ matrix.node-version }}
all-clear:
if: always()
runs-on: ubuntu-latest
needs:
- lint
- ci
- unit
- integration
- versioned-internal
- versioned-external
steps:
- name: All checks passed
if: ${{ !(contains(needs.*.result, 'failure')) }}
run: exit 0
- name: Some checks failed
if: ${{ contains(needs.*.result, 'failure') }}
run: exit 1