|
1 | 1 | name: PR |
2 | 2 |
|
3 | 3 | on: |
4 | | - pull_request: |
5 | | - types: [opened, reopened, synchronize] |
| 4 | + pull_request: |
| 5 | + types: [opened, reopened, synchronize] |
6 | 6 |
|
7 | 7 | jobs: |
8 | | - soundness: |
9 | | - name: Soundness |
10 | | - uses: apple/swift-nio/.github/workflows/soundness.yml@main |
11 | | - with: |
12 | | - api_breakage_check_enabled: true |
13 | | - broken_symlink_check_enabled: true |
14 | | - docs_check_enabled: true |
15 | | - format_check_enabled: true |
16 | | - license_header_check_enabled: true |
17 | | - license_header_check_project_name: "SwiftOpenAPIGenerator" |
18 | | - shell_check_enabled: true |
19 | | - unacceptable_language_check_enabled: true |
| 8 | + soundness: |
| 9 | + name: Soundness |
| 10 | + uses: swiftlang/github-workflows/.github/workflows/soundness.yml@main |
| 11 | + with: |
| 12 | + api_breakage_check_enabled: false |
| 13 | + license_header_check_project_name: "SwiftOpenAPIGenerator" |
| 14 | + yamllint_check_enabled: false |
| 15 | + |
| 16 | + unit-tests: |
| 17 | + name: Unit tests |
| 18 | + uses: apple/swift-nio/.github/workflows/unit_tests.yml@main |
| 19 | + with: |
| 20 | + linux_5_10_arguments_override: "--explicit-target-dependency-import-check error" |
| 21 | + linux_6_0_arguments_override: "-Xswiftc -warnings-as-errors --explicit-target-dependency-import-check error" |
| 22 | + linux_6_1_arguments_override: "-Xswiftc -warnings-as-errors --explicit-target-dependency-import-check error" |
| 23 | + linux_nightly_next_arguments_override: "--explicit-target-dependency-import-check error" |
| 24 | + linux_nightly_main_arguments_override: "--explicit-target-dependency-import-check error" |
| 25 | + windows_6_0_enabled: true |
| 26 | + windows_6_1_enabled: true |
| 27 | + windows_nightly_6_1_enabled: true |
| 28 | + windows_nightly_main_enabled: true |
| 29 | + windows_6_0_arguments_override: "--explicit-target-dependency-import-check error" |
| 30 | + windows_6_1_arguments_override: "--explicit-target-dependency-import-check error" |
| 31 | + windows_nightly_6_1_arguments_override: "--explicit-target-dependency-import-check error" |
| 32 | + windows_nightly_main_arguments_override: "--explicit-target-dependency-import-check error" |
20 | 33 |
|
21 | | - unit-tests: |
22 | | - name: Unit tests |
23 | | - uses: apple/swift-nio/.github/workflows/unit_tests.yml@main |
| 34 | + compatibility-test: |
| 35 | + name: Compatibility test |
| 36 | + runs-on: ubuntu-latest |
| 37 | + container: |
| 38 | + image: swift:latest |
| 39 | + steps: |
| 40 | + - name: Checkout repository |
| 41 | + uses: actions/checkout@v4 |
24 | 42 | with: |
25 | | - linux_5_8_enabled: false |
26 | | - linux_5_9_arguments_override: "--explicit-target-dependency-import-check error" |
27 | | - linux_5_10_arguments_override: "--explicit-target-dependency-import-check error" |
28 | | - linux_nightly_6_0_arguments_override: "--explicit-target-dependency-import-check error" |
29 | | - linux_nightly_main_enabled: false |
| 43 | + persist-credentials: false |
| 44 | + - name: Run OpenAPI document compatibilty test |
| 45 | + env: |
| 46 | + SWIFT_OPENAPI_COMPATIBILITY_TEST_ENABLE: "true" |
| 47 | + SWIFT_OPENAPI_COMPATIBILITY_TEST_SKIP_BUILD: "true" |
| 48 | + SWIFT_OPENAPI_COMPATIBILITY_TEST_FILTER: OpenAPIGeneratorReferenceTests.CompatibilityTest |
| 49 | + SWIFT_OPENAPI_COMPATIBILITY_TEST_PARALLEL_CODEGEN: "true" |
| 50 | + SWIFT_OPENAPI_COMPATIBILITY_TEST_NUM_BUILD_JOBS: 1 |
| 51 | + run: swift test --filter ${SWIFT_OPENAPI_COMPATIBILITY_TEST_FILTER} |
30 | 52 |
|
31 | | - integration-test: |
32 | | - name: Integration test |
33 | | - uses: apple/swift-nio/.github/workflows/swift_matrix.yml@main |
| 53 | + construct-integration-test-matrix: |
| 54 | + name: Construct integration matrix |
| 55 | + runs-on: ubuntu-latest |
| 56 | + outputs: |
| 57 | + integration-test-matrix: '${{ steps.generate-matrix.outputs.integration-test-matrix }}' |
| 58 | + steps: |
| 59 | + - name: Checkout repository |
| 60 | + uses: actions/checkout@v4 |
34 | 61 | with: |
35 | | - name: "Integration test" |
36 | | - matrix_linux_command: "apt-get update -yq && apt-get install -yq jq && SWIFT_OPENAPI_GENERATOR_REPO_URL=file://${GITHUB_WORKSPACE} ./scripts/run-integration-test.sh" |
37 | | - matrix_linux_5_8_enabled: false |
38 | | - matrix_linux_nightly_main_enabled: false |
| 62 | + persist-credentials: false |
| 63 | + - id: generate-matrix |
| 64 | + run: echo "integration-test-matrix=$(curl -s https://raw.githubusercontent.com/apple/swift-nio/main/scripts/generate_matrix.sh | bash)" >> "$GITHUB_OUTPUT" |
| 65 | + env: |
| 66 | + MATRIX_LINUX_SETUP_COMMAND: apt-get update -y && apt-get install -yq jq && git config --global --add safe.directory /swift-openapi-generator/.git && git config --global --add safe.directory /swift-openapi-generator |
| 67 | + MATRIX_LINUX_COMMAND: SWIFT_OPENAPI_GENERATOR_REPO_URL=file://${workspace} ./scripts/run-integration-test.sh |
| 68 | + MATRIX_LINUX_NIGHTLY_MAIN_ENABLED: false |
39 | 69 |
|
40 | | - compatibility-test: |
41 | | - name: Compatibility test |
42 | | - runs-on: ubuntu-latest |
43 | | - container: |
44 | | - image: swift:latest |
45 | | - steps: |
46 | | - - name: Checkout repository |
47 | | - uses: actions/checkout@v4 |
48 | | - with: |
49 | | - persist-credentials: false |
50 | | - - name: Run OpenAPI document compatibilty test |
51 | | - env: |
52 | | - SWIFT_OPENAPI_COMPATIBILITY_TEST_ENABLE: "true" |
53 | | - SWIFT_OPENAPI_COMPATIBILITY_TEST_SKIP_BUILD: "true" |
54 | | - SWIFT_OPENAPI_COMPATIBILITY_TEST_FILTER: OpenAPIGeneratorReferenceTests.CompatibilityTest |
55 | | - SWIFT_OPENAPI_COMPATIBILITY_TEST_PARALLEL_CODEGEN: "true" |
56 | | - SWIFT_OPENAPI_COMPATIBILITY_TEST_NUM_BUILD_JOBS: 1 |
57 | | - run: swift test --filter ${SWIFT_OPENAPI_COMPATIBILITY_TEST_FILTER} |
| 70 | + integration-test: |
| 71 | + name: Integration test |
| 72 | + needs: construct-integration-test-matrix |
| 73 | + uses: apple/swift-nio/.github/workflows/swift_test_matrix.yml@main |
| 74 | + with: |
| 75 | + name: "Integration test" |
| 76 | + matrix_string: '${{ needs.construct-integration-test-matrix.outputs.integration-test-matrix }}' |
58 | 77 |
|
59 | | - example-packages: |
60 | | - name: Example packages |
61 | | - uses: apple/swift-nio/.github/workflows/swift_matrix.yml@main |
| 78 | + construct-example-packages-matrix: |
| 79 | + name: Construct example packages matrix |
| 80 | + runs-on: ubuntu-latest |
| 81 | + outputs: |
| 82 | + example-packages-matrix: '${{ steps.generate-matrix.outputs.example-packages-matrix }}' |
| 83 | + steps: |
| 84 | + - name: Checkout repository |
| 85 | + uses: actions/checkout@v4 |
62 | 86 | with: |
63 | | - name: "Example packages" |
64 | | - matrix_linux_command: "./scripts/test-examples.sh" |
65 | | - matrix_linux_5_8_enabled: false |
66 | | - matrix_linux_nightly_main_enabled: false |
| 87 | + persist-credentials: false |
| 88 | + - id: generate-matrix |
| 89 | + run: echo "example-packages-matrix=$(curl -s https://raw.githubusercontent.com/apple/swift-nio/main/scripts/generate_matrix.sh | bash)" >> "$GITHUB_OUTPUT" |
| 90 | + env: |
| 91 | + MATRIX_LINUX_SETUP_COMMAND: git config --global --add safe.directory /swift-openapi-generator |
| 92 | + MATRIX_LINUX_COMMAND: ./scripts/test-examples.sh |
| 93 | + MATRIX_LINUX_NIGHTLY_MAIN_ENABLED: false |
| 94 | + |
| 95 | + example-packages: |
| 96 | + name: Example packages |
| 97 | + needs: construct-example-packages-matrix |
| 98 | + uses: apple/swift-nio/.github/workflows/swift_test_matrix.yml@main |
| 99 | + with: |
| 100 | + name: "Example packages" |
| 101 | + matrix_string: '${{ needs.construct-example-packages-matrix.outputs.example-packages-matrix }}' |
| 102 | + |
67 | 103 |
|
68 | | - swift-6-language-mode: |
69 | | - name: Swift 6 Language Mode |
70 | | - uses: apple/swift-nio/.github/workflows/swift_6_language_mode.yml@main |
71 | | - if: false # Disabled for now. |
| 104 | + macos-tests: |
| 105 | + name: macOS tests |
| 106 | + uses: apple/swift-nio/.github/workflows/macos_tests.yml@main |
| 107 | + with: |
| 108 | + runner_pool: general |
| 109 | + build_scheme: swift-openapi-generator-Package |
| 110 | + ios_xcode_build_enabled: false |
| 111 | + watchos_xcode_build_enabled: false |
| 112 | + tvos_xcode_build_enabled: false |
| 113 | + visionos_xcode_build_enabled: false |
0 commit comments