Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Switch integration tests to newer Swift test matrix
Motivation:

To remove all uses of the older workflow so it can be removed to
simplify the workflows.

Modifications:

* Switch integration tests to use the newer Swift test matrix workflow,
  `swift_test_matrix.yml`
* As part of this I had to add a git config command to the setup
  instructions. Lots of other repos have been using the matrix workflow
  without needing this so I'm unsure of why it's needed here. If it
  becomes common I'll look at a central way to include this.

Result:

This should make no difference to the running of integration tests.
  • Loading branch information
rnro committed Apr 8, 2025
commit 21c25abe7e25accb89aa328b42cad60e89b4db7a
22 changes: 20 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,30 @@ jobs:
windows_nightly_6_1_arguments_override: "--explicit-target-dependency-import-check error"
windows_nightly_main_arguments_override: "--explicit-target-dependency-import-check error"

construct-integration-test-matrix:
name: Construct integration matrix
runs-on: ubuntu-latest
outputs:
integration-test-matrix: '${{ steps.generate-matrix.outputs.integration-test-matrix }}'
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
persist-credentials: false
- id: generate-matrix
run: echo "integration-test-matrix=$(curl -s https://raw.githubusercontent.com/apple/swift-nio/main/scripts/generate_matrix.sh | bash)" >> "$GITHUB_OUTPUT"
env:
MATRIX_LINUX_SETUP_COMMAND: apt-get update -y && apt-get install -yq jq
MATRIX_LINUX_COMMAND: ./scripts/run-integration-test.sh

integration-test:
name: Integration test
uses: apple/swift-nio/.github/workflows/swift_matrix.yml@main
needs: construct-integration-test-matrix
uses: apple/swift-nio/.github/workflows/swift_test_matrix.yml@main
with:
name: "Integration test"
matrix_linux_command: "apt-get update -yq && apt-get install -yq jq && ./scripts/run-integration-test.sh"
matrix_string: '${{ needs.construct-integration-test-matrix.outputs.integration-test-matrix }}'
matrix_linux_nightly_main_enabled: false

static-sdk:
name: Static SDK
Expand Down
23 changes: 20 additions & 3 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,30 @@ jobs:
windows_nightly_6_1_arguments_override: "--explicit-target-dependency-import-check error"
windows_nightly_main_arguments_override: "--explicit-target-dependency-import-check error"

construct-integration-test-matrix:
name: Construct integration matrix
runs-on: ubuntu-latest
outputs:
integration-test-matrix: '${{ steps.generate-matrix.outputs.integration-test-matrix }}'
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
persist-credentials: false
- id: generate-matrix
run: echo "integration-test-matrix=$(curl -s https://raw.githubusercontent.com/apple/swift-nio/main/scripts/generate_matrix.sh | bash)" >> "$GITHUB_OUTPUT"
env:
MATRIX_LINUX_SETUP_COMMAND: apt-get update -y && apt-get install -yq jq && git config --global --add safe.directory /swift-openapi-runtime
MATRIX_LINUX_COMMAND: ./scripts/run-integration-test.sh
MATRIX_LINUX_NIGHTLY_MAIN_ENABLED: false

integration-test:
name: Integration test
uses: apple/swift-nio/.github/workflows/swift_matrix.yml@main
needs: construct-integration-test-matrix
uses: apple/swift-nio/.github/workflows/swift_test_matrix.yml@main
with:
name: "Integration test"
matrix_linux_command: "apt-get update -yq && apt-get install -yq jq && ./scripts/run-integration-test.sh"
matrix_linux_nightly_main_enabled: false
matrix_string: '${{ needs.construct-integration-test-matrix.outputs.integration-test-matrix }}'

static-sdk:
name: Static SDK
Expand Down
Loading