From 2e689883ec040614944fcc76bdcec1f5be2a56dd Mon Sep 17 00:00:00 2001 From: Ximon Eighteen <3304436+ximon18@users.noreply.github.com> Date: Fri, 10 Apr 2026 13:06:47 +0200 Subject: [PATCH 1/3] Reduce git conflicts and verbose test definitions. Combine the almost identical system test definitions into a single job that invokes them as a matrix requiring only that new test names be added to the 'tests' matrix key rather than duplicating the entire job block every time, and each PR that adds a system test then conflicting with the others due to each modifying the same part of system-tests.yml. Adds a note in act-wrapper that to limit which tests are run by the new tests job one must now supply --matrix tests: instead of --job .. --- act-wrapper | 2 + integration-tests/system-tests.yml | 128 ++--------------------------- 2 files changed, 9 insertions(+), 121 deletions(-) diff --git a/act-wrapper b/act-wrapper index 78a487f3..ec0bcbab 100755 --- a/act-wrapper +++ b/act-wrapper @@ -34,6 +34,8 @@ function usage { echo "Inputs that can be provided via --input:" echo " --input build-profile=debug|release" echo " --input log-level=error|warn|info|debug|trace" + echo "" + echo "Use --matrix test: to limit which jobs the 'tests' job runs." } if [[ "$1" =~ ^-h|--help$ ]]; then diff --git a/integration-tests/system-tests.yml b/integration-tests/system-tests.yml index 03e2e710..e7250750 100644 --- a/integration-tests/system-tests.yml +++ b/integration-tests/system-tests.yml @@ -60,9 +60,6 @@ jobs: test-release-version: name: Example test with prepare environment and cascade --version (release) runs-on: ubuntu-latest - strategy: - matrix: - rust: [stable] steps: - uses: actions/checkout@v4 - uses: ./.github/actions/prepare-systest-env @@ -75,94 +72,28 @@ jobs: test-version: name: Example test with prepare environment and cascade --version (debug) runs-on: ubuntu-latest - strategy: - matrix: - rust: [stable] steps: - uses: actions/checkout@v4 - uses: ./.github/actions/prepare-systest-env - run: cascade --version - run: file $(which cascade) - add-zone-query: - name: Add a zone, query the published zone - runs-on: ubuntu-latest - strategy: - matrix: - rust: [stable] - steps: - - uses: actions/checkout@v4 - - uses: ./.github/actions/set-build-profile - with: - build-profile: ${{ inputs.build-profile }} - - uses: ./integration-tests/tests/add-zone-query - with: - log-level: ${{ inputs.log-level }} - - # Added for https://github.com/NLnetLabs/cascade/pull/402 - load-zonefile: - name: Load a zone from a file, query the published zone + tests: + name: Run the system tests runs-on: ubuntu-latest strategy: matrix: - rust: [stable] + test: [add-zone-query, load-zonefile, review-unsigned-zone, review-unsigned-zone2, ixfr-in, notify-in-for-unknown-zone, remove-zone, all-rr-types] steps: - uses: actions/checkout@v4 - uses: ./.github/actions/set-build-profile with: build-profile: ${{ inputs.build-profile }} - - uses: ./integration-tests/tests/load-zonefile + - uses: jenseng/dynamic-uses@v1 with: - log-level: ${{ inputs.log-level }} - - # Added for https://github.com/NLnetLabs/cascade/pull/398 - review-unsigned-zone: - name: Add a zone, approve the unsigned zone, query the published zone - runs-on: ubuntu-latest - strategy: - matrix: - rust: [stable] - steps: - - uses: actions/checkout@v4 - - uses: ./.github/actions/set-build-profile - with: - build-profile: ${{ inputs.build-profile }} - - uses: ./integration-tests/tests/review-unsigned-zone - with: - log-level: ${{ inputs.log-level }} - - review-unsigned-zone2: - name: Test that the review server has the original zone - runs-on: ubuntu-latest - strategy: - #max-parallel: 1 - matrix: - rust: [stable] - test_idx: [1, 2] - key: ['Kexample.+015+02835.key'] - steps: - - uses: actions/checkout@v4 - - uses: ./.github/actions/set-build-profile - with: - build-profile: ${{ inputs.build-profile }} - - uses: ./integration-tests/tests/review-unsigned-zone2 - with: - log-level: ${{ inputs.log-level }} - test_idx: ${{ matrix.test_idx }} - key: ${{ matrix.key }} - - ixfr-in: - name: Receive a zone via IXFR from the NSD primary. - runs-on: ubuntu-latest - strategy: - matrix: - rust: [stable] - steps: - - uses: actions/checkout@v4 - - uses: ./.github/actions/set-build-profile - with: - build-profile: ${{ inputs.build-profile }} - - uses: ./integration-tests/tests/ixfr-in + uses: ./integration-tests/tests/${{ matrix.test }} + # with: + # log-level: ${{ inputs.log-level }} incremental-signing: name: Test incremental signing. @@ -213,48 +144,3 @@ jobs: policy: ${{ matrix.policy }} test_idx: ${{ matrix.test_idx }} key: ${{ matrix.key }} - - notify-in-for-unknown-zone: - name: Receive a NOTIFY for a zone that is unknown to Cascade. - runs-on: ubuntu-latest - strategy: - matrix: - rust: [stable] - steps: - - uses: actions/checkout@v4 - - uses: ./.github/actions/set-build-profile - with: - build-profile: release - - uses: ./integration-tests/tests/notify-in-for-unknown-zone - with: - log-level: ${{ inputs.log-level }} - - remove-zone: - name: Add, sign and remove a zone. - runs-on: ubuntu-latest - strategy: - matrix: - rust: [stable] - steps: - - uses: actions/checkout@v4 - - uses: ./.github/actions/set-build-profile - with: - build-profile: ${{ inputs.build-profile }} - - uses: ./integration-tests/tests/remove-zone - with: - log-level: ${{ inputs.log-level }} - - all-rr-types: - name: Tests loading of all supported RR types. - runs-on: ubuntu-latest - strategy: - matrix: - rust: [stable] - steps: - - uses: actions/checkout@v4 - - uses: ./.github/actions/set-build-profile - with: - build-profile: ${{ inputs.build-profile }} - - uses: ./integration-tests/tests/all-rr-types - with: - log-level: ${{ inputs.log-level }} From 625d4b630a30b82af34a4ee9b220a4e448aa3d32 Mon Sep 17 00:00:00 2001 From: Ximon Eighteen <3304436+ximon18@users.noreply.github.com> Date: Fri, 10 Apr 2026 13:24:11 +0200 Subject: [PATCH 2/3] Fix job naming. --- act-wrapper | 2 +- integration-tests/system-tests.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/act-wrapper b/act-wrapper index ec0bcbab..886fe6cd 100755 --- a/act-wrapper +++ b/act-wrapper @@ -162,7 +162,7 @@ if [[ "$docker_stats" == true ]]; then fi echo "Running tests" -act "${act_args[@]}" --log-prefix-job-id --pull=false -P "ubuntu-latest=nlnetlabs/cascade-tests-runner" -W integration-tests/system-tests.yml "$@" && ACT_EXIT_CODE=$? || ACT_EXIT_CODE=$? +act "${act_args[@]}" --pull=false -P "ubuntu-latest=nlnetlabs/cascade-tests-runner" -W integration-tests/system-tests.yml "$@" && ACT_EXIT_CODE=$? || ACT_EXIT_CODE=$? # Stop the docker stats collection process, if needed. if [[ "$docker_stats" == true ]]; then diff --git a/integration-tests/system-tests.yml b/integration-tests/system-tests.yml index e7250750..e4fc4c28 100644 --- a/integration-tests/system-tests.yml +++ b/integration-tests/system-tests.yml @@ -79,7 +79,7 @@ jobs: - run: file $(which cascade) tests: - name: Run the system tests + name: Run ${{ join(matrix.test, ' - ') }} runs-on: ubuntu-latest strategy: matrix: From 47b4ecd459c48663ce2e44aee0c051bca75cc50e Mon Sep 17 00:00:00 2001 From: Ximon Eighteen <3304436+ximon18@users.noreply.github.com> Date: Fri, 10 Apr 2026 13:27:36 +0200 Subject: [PATCH 3/3] Allow max concurrent tests to be controlled. --- act-wrapper | 1 + integration-tests/system-tests.yml | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/act-wrapper b/act-wrapper index 886fe6cd..0c5b7218 100755 --- a/act-wrapper +++ b/act-wrapper @@ -34,6 +34,7 @@ function usage { echo "Inputs that can be provided via --input:" echo " --input build-profile=debug|release" echo " --input log-level=error|warn|info|debug|trace" + echo " --input concurrent-tests=1" echo "" echo "Use --matrix test: to limit which jobs the 'tests' job runs." } diff --git a/integration-tests/system-tests.yml b/integration-tests/system-tests.yml index e4fc4c28..ff47cb14 100644 --- a/integration-tests/system-tests.yml +++ b/integration-tests/system-tests.yml @@ -44,6 +44,11 @@ on: - info - debug - trace + concurrent-tests: + description: The number of tests job system tests to run concurrently. + required: false + default: 8 + type: number env: # Set this assignment to your choosing to set the cargo build verbosity @@ -84,6 +89,7 @@ jobs: strategy: matrix: test: [add-zone-query, load-zonefile, review-unsigned-zone, review-unsigned-zone2, ixfr-in, notify-in-for-unknown-zone, remove-zone, all-rr-types] + max-parallel: ${{ inputs.concurrent-tests }} steps: - uses: actions/checkout@v4 - uses: ./.github/actions/set-build-profile