Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 36da108

Browse files
authored
Migrate to GitHub Actions (#41)
Migrate CI to use GitHub Actions. ### Motivation: To migrate to GitHub actions and centralised infrastructure. ### Modifications: Changes of note: * Adopt swiftlang soundness checks, swift version matrix * Remove scripts and docker files which are no longer needed ### Result: Feature parity with old CI. ### Test Plan Execute CI
1 parent 7b96b1d commit 36da108

22 files changed

+115
-546
lines changed

‎.editorconfig

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
root = true
2+
3+
[*]
4+
indent_style = space
5+
indent_size = 4
6+
end_of_line = lf
7+
insert_final_newline = true
8+
trim_trailing_whitespace = true

‎.github/workflows/main.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Main
2+
3+
on:
4+
push:
5+
branches: [main]
6+
schedule:
7+
- cron: "0 8,20 * * *"
8+
9+
jobs:
10+
unit-tests:
11+
name: Unit tests
12+
uses: apple/swift-nio/.github/workflows/unit_tests.yml@main
13+
with:
14+
linux_5_9_arguments_override: "-Xswiftc -warnings-as-errors --explicit-target-dependency-import-check error"
15+
linux_5_10_arguments_override: "-Xswiftc -warnings-as-errors --explicit-target-dependency-import-check error"
16+
linux_6_0_arguments_override: "-Xswiftc -warnings-as-errors --explicit-target-dependency-import-check error -Xswiftc -require-explicit-sendable"
17+
linux_nightly_6_0_arguments_override: "--explicit-target-dependency-import-check error -Xswiftc -require-explicit-sendable"
18+
linux_nightly_main_arguments_override: "--explicit-target-dependency-import-check error -Xswiftc -require-explicit-sendable"

‎.github/workflows/pull_request.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: PR
2+
3+
on:
4+
pull_request:
5+
types: [opened, reopened, synchronize]
6+
7+
jobs:
8+
soundness:
9+
name: Soundness
10+
uses: swiftlang/github-workflows/.github/workflows/soundness.yml@main
11+
with:
12+
license_header_check_project_name: "SwiftOpenAPIGenerator"
13+
14+
unit-tests:
15+
name: Unit tests
16+
uses: apple/swift-nio/.github/workflows/unit_tests.yml@main
17+
with:
18+
linux_5_9_arguments_override: "-Xswiftc -warnings-as-errors --explicit-target-dependency-import-check error -Xswiftc -strict-concurrency=complete"
19+
# TODO: `enable -Xswiftc -strict-concurrency=complete`
20+
linux_5_10_arguments_override: "-Xswiftc -warnings-as-errors --explicit-target-dependency-import-check error"
21+
linux_6_0_arguments_override: "-Xswiftc -warnings-as-errors --explicit-target-dependency-import-check error -Xswiftc -require-explicit-sendable -Xswiftc -strict-concurrency=complete"
22+
linux_nightly_6_0_arguments_override: "--explicit-target-dependency-import-check error -Xswiftc -require-explicit-sendable"
23+
linux_nightly_main_arguments_override: "--explicit-target-dependency-import-check error -Xswiftc -require-explicit-sendable"
24+
25+
cxx-interop:
26+
name: Cxx interop
27+
uses: apple/swift-nio/.github/workflows/cxx_interop.yml@main
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: PR label
2+
3+
on:
4+
pull_request:
5+
types: [labeled, unlabeled, opened, reopened, synchronize]
6+
7+
jobs:
8+
semver-label-check:
9+
name: Semantic version label check
10+
runs-on: ubuntu-latest
11+
timeout-minutes: 1
12+
steps:
13+
- name: Checkout repository
14+
uses: actions/checkout@v4
15+
with:
16+
persist-credentials: false
17+
- name: Check for Semantic Version label
18+
uses: apple/swift-nio/.github/actions/pull_request_semver_label_checker@main

‎.licenseignore

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
.gitignore
2+
**/.gitignore
3+
.licenseignore
4+
.gitattributes
5+
.git-blame-ignore-revs
6+
.mailfilter
7+
.mailmap
8+
.spi.yml
9+
.swift-format
10+
.swiftformatignore
11+
.editorconfig
12+
.github/*
13+
*.md
14+
*.txt
15+
*.yml
16+
*.yaml
17+
*.json
18+
Package.swift
19+
**/Package.swift
20+
Package@-*.swift
21+
**/Package@-*.swift
22+
Package.resolved
23+
**/Package.resolved
24+
Makefile
25+
*.modulemap
26+
**/*.modulemap
27+
**/*.docc/*
28+
*.xcprivacy
29+
**/*.xcprivacy
30+
*.symlink
31+
**/*.symlink
32+
Dockerfile
33+
**/Dockerfile
34+
Snippets/*
35+
dev/git.commit.template
36+
.unacceptablelanguageignore

‎.spi.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
version: 1
22
builder:
33
configs:
4-
- documentation_targets:
5-
- OpenAPIAsyncHTTPClient
4+
- documentation_targets:
5+
- OpenAPIAsyncHTTPClient

‎CONTRIBUTING.md

Lines changed: 3 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -56,28 +56,10 @@ A good patch is:
5656
3. Documented, adding API documentation as needed to cover new functions and properties.
5757
4. Accompanied by a great commit message, using our commit message template.
5858

59-
### Run `./scripts/soundness.sh`
59+
### Run CI checks locally
6060

61-
The scripts directory contains a [soundness.sh script](https://github.com/swift-server/swift-openapi-async-http-client/blob/main/scripts/soundness.sh)
62-
that enforces additional checks, like license headers and formatting style.
63-
64-
Please make sure to `./scripts/soundness.sh` before pushing a change upstream, otherwise it is likely the PR validation will fail
65-
on minor changes such as a missing `self.` or similar formatting issues.
66-
67-
For frequent contributors, we recommend adding the script as a [git pre-push hook](https://git-scm.com/book/en/v2/Customizing-Git-Git-Hooks), which you can do via executing the following command in the project root directory:
68-
69-
```bash
70-
cat << EOF > .git/hooks/pre-push
71-
72-
if [[ -f "scripts/soundness.sh" ]]; then
73-
scripts/soundness.sh
74-
fi
75-
EOF
76-
```
77-
78-
Which makes the script execute, and only allow the `git push` to complete if the check has passed.
79-
80-
In the case of formatting issues, you can then `git add` the formatting changes, and attempt the push again.
61+
You can run the GitHub Actions workflows locally using
62+
[act](https://github.com/nektos/act). For detailed steps on how to do this please see [https://github.com/swiftlang/github-workflows?tab=readme-ov-file#running-workflows-locally](https://github.com/swiftlang/github-workflows?tab=readme-ov-file#running-workflows-locally).
8163

8264
## How to contribute your work
8365

‎Package.swift

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -24,21 +24,13 @@ let swiftSettings: [SwiftSetting] = [
2424

2525
let package = Package(
2626
name: "swift-openapi-async-http-client",
27-
platforms: [
28-
.macOS(.v10_15), .iOS(.v13), .tvOS(.v13), .watchOS(.v6), .visionOS(.v1)
29-
],
30-
products: [
31-
.library(
32-
name: "OpenAPIAsyncHTTPClient",
33-
targets: ["OpenAPIAsyncHTTPClient"]
34-
),
35-
],
27+
platforms: [.macOS(.v10_15), .iOS(.v13), .tvOS(.v13), .watchOS(.v6), .visionOS(.v1)],
28+
products: [.library(name: "OpenAPIAsyncHTTPClient", targets: ["OpenAPIAsyncHTTPClient"])],
3629
dependencies: [
3730
.package(url: "https://github.com/apple/swift-nio", from: "2.58.0"),
3831
.package(url: "https://github.com/swift-server/async-http-client.git", from: "1.23.0"),
3932
.package(url: "https://github.com/apple/swift-openapi-runtime", from: "1.0.0"),
4033
.package(url: "https://github.com/apple/swift-http-types", from: "1.0.0"),
41-
.package(url: "https://github.com/apple/swift-docc-plugin", from: "1.0.0"),
4234
],
4335
targets: [
4436
.target(
@@ -53,9 +45,7 @@ let package = Package(
5345
),
5446
.testTarget(
5547
name: "OpenAPIAsyncHTTPClientTests",
56-
dependencies: [
57-
"OpenAPIAsyncHTTPClient",
58-
],
48+
dependencies: ["OpenAPIAsyncHTTPClient"],
5949
swiftSettings: swiftSettings
6050
),
6151
]

‎docker/Dockerfile

Lines changed: 0 additions & 23 deletions
This file was deleted.

‎docker/docker-compose.2204.510.yaml

Lines changed: 0 additions & 17 deletions
This file was deleted.

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /