Bump the dependencies group across 28 directories with 28 updates #41
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: Checks | |
on: | |
push: | |
branches: [main] | |
paths-ignore: | |
- "mkdocs.yml" | |
- "docs/**" | |
- "README.md" | |
pull_request: | |
branches: [main] | |
paths-ignore: | |
- "mkdocs.yml" | |
- "docs/**" | |
- "README.md" | |
concurrency: | |
group: "${{ github.workflow }}-${{ github.head_ref || github.sha }}" | |
cancel-in-progress: true | |
jobs: | |
detect-modules: | |
name: Detect packages to check | |
runs-on: ubuntu-22.04 | |
outputs: | |
modules: ${{ steps.set-modified-modules.outputs.modules }} | |
modules_count: ${{ steps.set-modified-modules-count.outputs.modules_count }} | |
steps: | |
- name: Check out code | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- id: changed-files | |
name: Get changed files | |
uses: tj-actions/changed-files@ed68ef82c095e0d48ec87eccea555d944a631a4c # v46.0.5 | |
- id: set-modified-modules | |
name: Set all modified modules | |
env: | |
ALL_CHANGED_FILES: "${{ steps.changed-files.outputs.all_changed_files }}" | |
run: echo "modules=$(./.github/scripts/changed-modules.sh)" >> $GITHUB_OUTPUT | |
- id: set-modified-modules-count | |
name: Set all modified modules count | |
run: echo "modules_count=$(echo ${{ toJSON(steps.set-modified-modules.outputs.modules) }} | jq '. | length')" >> $GITHUB_OUTPUT | |
- name: Print out the modules to be used | |
run: | | |
echo "${{ steps.set-modified-modules-count.outputs.modules_count }} modules in the build" | |
echo "${{ steps.set-modified-modules.outputs.modules }}" | |
lint: | |
if: ${{ needs.detect-modules.outputs.modules_count > 0 }} | |
name: "Lint" | |
needs: | |
- detect-modules | |
strategy: | |
fail-fast: false | |
matrix: | |
module: ${{ fromJSON(needs.detect-modules.outputs.modules) }} | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Code checkout | |
uses: actions/checkout@v4 | |
- name: Install Node and Dependencies | |
id: npm-install-modules | |
uses: ./.github/actions/npm-setup | |
with: | |
runner: ubuntu-22.04 | |
node-version: 24.x | |
workspace: "${{ matrix.module }}" | |
- name: Code linting | |
env: | |
WORKSPACE_PATH: ${{ steps.npm-install-modules.outputs.workspace_path }} | |
run: npm run lint:ci | |
compile: | |
if: ${{ needs.detect-modules.outputs.modules_count > 0 }} | |
name: Compile | |
needs: | |
- detect-modules | |
- lint | |
strategy: | |
fail-fast: false | |
matrix: | |
module: ${{ fromJSON(needs.detect-modules.outputs.modules) }} | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Code checkout | |
uses: actions/checkout@v4 | |
- name: Install Node and Dependencies | |
id: npm-install | |
uses: ./.github/actions/npm-setup | |
with: | |
runner: ubuntu-22.04 | |
node-version: 24.x | |
workspace: "${{ matrix.module }}" | |
- name: Compile | |
run: | | |
npm run build --ignore-scripts --workspace packages/testcontainers -- --project tsconfig.json | |
if [ "${{ matrix.module }}" != "testcontainers" ]; then | |
npm run build --ignore-scripts --workspace ${{ steps.npm-install.outputs.workspace_path }} -- --project tsconfig.json --noEmit | |
fi | |
smoke-test: | |
if: ${{ needs.detect-modules.outputs.modules_count > 0 }} | |
needs: | |
- detect-modules | |
- lint | |
- compile | |
name: Smoke tests | |
strategy: | |
fail-fast: false | |
matrix: | |
node-version: [20.x, 22.x, 24.x] | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Code checkout | |
uses: actions/checkout@v4 | |
- name: Install Node ${{ matrix.node-version }} and Dependencies | |
uses: ./.github/actions/npm-setup | |
with: | |
runner: ubuntu-22.04 | |
node-version: ${{ matrix.node-version }} | |
workspace: "testcontainers" | |
- name: Build testcontainers | |
run: npm run build --workspace packages/testcontainers | |
- name: Remove dev dependencies | |
run: npm prune --omit=dev --workspace packages/testcontainers | |
- name: Run CommonJS module smoke test | |
run: node packages/testcontainers/smoke-test.js | |
- name: Run ES module smoke test | |
run: node packages/testcontainers/smoke-test.mjs | |
test: | |
if: ${{ needs.detect-modules.outputs.modules_count > 0 }} | |
name: Tests | |
needs: | |
- detect-modules | |
- lint | |
- compile | |
- smoke-test | |
strategy: | |
fail-fast: false | |
matrix: | |
module: ${{ fromJSON(needs.detect-modules.outputs.modules) }} | |
node-version: [20.x, 22.x, 24.x] | |
container-runtime: [docker, podman] | |
uses: ./.github/workflows/test-template.yml | |
with: | |
runner: ubuntu-22.04 | |
node-version: ${{ matrix.node-version }} | |
container-runtime: ${{ matrix.container-runtime }} | |
workspace: "${{ matrix.module }}" | |
end: | |
if: ${{ needs.detect-modules.outputs.modules_count > 0 }} | |
name: Checks complete | |
needs: | |
- detect-modules | |
- lint | |
- compile | |
- smoke-test | |
- test | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Check if any jobs failed | |
if: ${{ failure() || cancelled() }} | |
run: exit 1 | |
- run: echo "All tests completed successfully!" |