-
Notifications
You must be signed in to change notification settings - Fork 161
158 lines (144 loc) · 6.54 KB
/
pull_request.yml
File metadata and controls
158 lines (144 loc) · 6.54 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
name: PR
permissions:
contents: read
on:
pull_request:
types: [opened, reopened, synchronize]
jobs:
soundness:
name: Soundness
uses: swiftlang/github-workflows/.github/workflows/soundness.yml@0.0.7
with:
api_breakage_check_enabled: false
license_header_check_project_name: "SwiftOpenAPIGenerator"
yamllint_check_enabled: false
unit-tests:
name: Unit tests
uses: apple/swift-nio/.github/workflows/unit_tests.yml@main
with:
linux_5_10_arguments_override: "--explicit-target-dependency-import-check error"
linux_6_0_arguments_override: "-Xswiftc -warnings-as-errors --explicit-target-dependency-import-check error"
linux_6_1_arguments_override: "-Xswiftc -warnings-as-errors --explicit-target-dependency-import-check error"
linux_6_2_arguments_override: "-Xswiftc -warnings-as-errors --explicit-target-dependency-import-check error"
linux_nightly_next_arguments_override: "--explicit-target-dependency-import-check error"
linux_nightly_main_arguments_override: "--explicit-target-dependency-import-check error"
windows_6_0_enabled: true
windows_6_1_enabled: true
windows_6_2_enabled: true
windows_nightly_6_1_enabled: true
windows_nightly_main_enabled: true
windows_6_0_arguments_override: "--explicit-target-dependency-import-check error"
windows_6_1_arguments_override: "--explicit-target-dependency-import-check error"
windows_6_2_arguments_override: "--explicit-target-dependency-import-check error"
windows_nightly_6_1_arguments_override: "--explicit-target-dependency-import-check error"
windows_nightly_main_arguments_override: "--explicit-target-dependency-import-check error"
compatibility-test:
name: Compatibility test
runs-on: ubuntu-latest
container:
image: swift:latest
steps:
- name: Checkout repository
uses: actions/checkout@v6
with:
persist-credentials: false
- name: Run OpenAPI document compatibilty test
env:
SWIFT_OPENAPI_COMPATIBILITY_TEST_ENABLE: "true"
SWIFT_OPENAPI_COMPATIBILITY_TEST_SKIP_BUILD: "true"
SWIFT_OPENAPI_COMPATIBILITY_TEST_FILTER: OpenAPIGeneratorReferenceTests.CompatibilityTest
SWIFT_OPENAPI_COMPATIBILITY_TEST_PARALLEL_CODEGEN: "true"
SWIFT_OPENAPI_COMPATIBILITY_TEST_NUM_BUILD_JOBS: 1
run: swift test --filter ${SWIFT_OPENAPI_COMPATIBILITY_TEST_FILTER}
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@v6
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-generator/.git && git config --global --add safe.directory /swift-openapi-generator
MATRIX_LINUX_COMMAND: SWIFT_OPENAPI_GENERATOR_REPO_URL=file://${workspace} ./scripts/run-integration-test.sh
MATRIX_LINUX_NIGHTLY_MAIN_ENABLED: false
integration-test:
name: Integration test
needs: construct-integration-test-matrix
uses: apple/swift-nio/.github/workflows/swift_test_matrix.yml@main
with:
name: "Integration test"
matrix_string: '${{ needs.construct-integration-test-matrix.outputs.integration-test-matrix }}'
construct-example-packages-matrix:
name: Construct example packages matrix
runs-on: ubuntu-latest
outputs:
example-packages-matrix: '${{ steps.generate-matrix.outputs.example-packages-matrix }}'
steps:
- name: Checkout repository
uses: actions/checkout@v6
with:
persist-credentials: false
- id: generate-matrix
run: echo "example-packages-matrix=$(curl -s https://raw.githubusercontent.com/apple/swift-nio/main/scripts/generate_matrix.sh | bash)" >> "$GITHUB_OUTPUT"
env:
MATRIX_LINUX_SETUP_COMMAND: git config --global --add safe.directory /swift-openapi-generator
MATRIX_LINUX_COMMAND: ./scripts/test-examples.sh
MATRIX_LINUX_NIGHTLY_MAIN_ENABLED: false
example-packages:
name: Example packages
needs: construct-example-packages-matrix
uses: apple/swift-nio/.github/workflows/swift_test_matrix.yml@main
with:
name: "Example packages"
matrix_string: '${{ needs.construct-example-packages-matrix.outputs.example-packages-matrix }}'
macos-tests:
name: macOS tests
uses: apple/swift-nio/.github/workflows/macos_tests.yml@main
with:
runner_pool: general
build_scheme: swift-openapi-generator-Package
ios_xcode_build_enabled: false
watchos_xcode_build_enabled: false
tvos_xcode_build_enabled: false
visionos_xcode_build_enabled: false
release-builds:
name: Release builds
uses: apple/swift-nio/.github/workflows/release_builds.yml@main
with:
windows_6_0_enabled: true
windows_6_1_enabled: true
windows_6_2_enabled: true
windows_nightly_next_enabled: true
windows_nightly_main_enabled: true
construct-linkage-test-matrix:
name: Construct linkage matrix
runs-on: ubuntu-latest
outputs:
linkage-test-matrix: '${{ steps.generate-matrix.outputs.linkage-test-matrix }}'
steps:
- name: Checkout repository
uses: actions/checkout@v6
with:
persist-credentials: false
- id: generate-matrix
run: echo "linkage-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-generator
MATRIX_LINUX_COMMAND: ./scripts/run-linkage-test.sh
MATRIX_LINUX_5_10_ENABLED: false
MATRIX_LINUX_6_0_ENABLED: false
MATRIX_LINUX_6_1_ENABLED: false
MATRIX_LINUX_NIGHTLY_NEXT_ENABLED: false
MATRIX_LINUX_NIGHTLY_MAIN_ENABLED: false
linkage-test:
name: Linkage test
needs: construct-linkage-test-matrix
uses: apple/swift-nio/.github/workflows/swift_test_matrix.yml@main
with:
name: "Linkage test"
matrix_string: '${{ needs.construct-linkage-test-matrix.outputs.linkage-test-matrix }}'