Skip to content

Commit 5a9b2bf

Browse files
authored
adopt github actions (#101)
* Adopt github actions * remove linux main * remove old scripts * fix check-unacceptable-language * remove integration test target * remove docc * formatting adjustments to land the change for now * fix docc * docs fixes
1 parent 4e56d9a commit 5a9b2bf

File tree

85 files changed

+1776
-1922
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

85 files changed

+1776
-1922
lines changed

.github/release.yml

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
changelog:
2+
categories:
3+
- title: SemVer Major
4+
labels:
5+
- ⚠️ semver/major
6+
- title: SemVer Minor
7+
labels:
8+
- semver/minor
9+
- title: SemVer Patch
10+
labels:
11+
- semver/patch
12+
- title: Other Changes
13+
labels:
14+
- semver/none

.github/workflows/pull_request.yml

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
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+
api_breakage_check_enabled: false
13+
license_header_check_project_name: "Swift Cluster Membership"
14+
15+
unit-tests:
16+
name: Unit tests
17+
uses: apple/swift-nio/.github/workflows/swift_matrix.yml@main
18+
with:
19+
name: "Unit tests"
20+
matrix_linux_command: "swift test"
21+
matrix_linux_5_9_enabled: false
22+
matrix_linux_5_10_enabled: true
23+
matrix_linux_6_0_enabled: true
24+
matrix_linux_6_0_command_override: "swift test"
25+
matrix_linux_nightly_6_0_enabled: true
26+
matrix_linux_nightly_main_enabled: true
27+
matrix_windows_6_0_enabled: false
28+
matrix_windows_nightly_6_0_enabled: false
29+
matrix_windows_nightly_main_enabled: false
+18
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

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

.swift-format

+73
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
{
2+
3+
4+
"version" : 1,
5+
"indentation" : {
6+
"spaces" : 4
7+
},
8+
"tabWidth" : 4,
9+
"fileScopedDeclarationPrivacy" : {
10+
"accessLevel" : "private"
11+
},
12+
"spacesAroundRangeFormationOperators" : false,
13+
"indentConditionalCompilationBlocks" : false,
14+
"indentSwitchCaseLabels" : false,
15+
"lineBreakAroundMultilineExpressionChainComponents" : false,
16+
"lineBreakBeforeControlFlowKeywords" : false,
17+
"lineBreakBeforeEachArgument" : true,
18+
"lineBreakBeforeEachGenericRequirement" : true,
19+
"lineLength" : 240,
20+
"maximumBlankLines" : 1,
21+
"respectsExistingLineBreaks" : true,
22+
"prioritizeKeepingFunctionOutputTogether" : true,
23+
"noAssignmentInExpressions" : {
24+
"allowedFunctions" : [
25+
"XCTAssertNoThrow",
26+
"XCTAssertThrowsError"
27+
]
28+
},
29+
"rules" : {
30+
"NoBlockComments" : false,
31+
"ReplaceForEachWithForLoop" : false,
32+
33+
"AllPublicDeclarationsHaveDocumentation" : false,
34+
"AlwaysUseLiteralForEmptyCollectionInit" : false,
35+
"AlwaysUseLowerCamelCase" : false,
36+
"AmbiguousTrailingClosureOverload" : true,
37+
"BeginDocumentationCommentWithOneLineSummary" : false,
38+
"DoNotUseSemicolons" : true,
39+
"DontRepeatTypeInStaticProperties" : true,
40+
"FileScopedDeclarationPrivacy" : true,
41+
"FullyIndirectEnum" : true,
42+
"GroupNumericLiterals" : true,
43+
"IdentifiersMustBeASCII" : true,
44+
"NeverForceUnwrap" : false,
45+
"NeverUseForceTry" : false,
46+
"NeverUseImplicitlyUnwrappedOptionals" : false,
47+
"NoAccessLevelOnExtensionDeclaration" : true,
48+
"NoAssignmentInExpressions" : true,
49+
"NoBlockComments" : true,
50+
"NoCasesWithOnlyFallthrough" : true,
51+
"NoEmptyTrailingClosureParentheses" : true,
52+
"NoLabelsInCasePatterns" : true,
53+
"NoLeadingUnderscores" : false,
54+
"NoParensAroundConditions" : true,
55+
"NoVoidReturnOnFunctionSignature" : true,
56+
"OmitExplicitReturns" : true,
57+
"OneCasePerLine" : true,
58+
"OneVariableDeclarationPerLine" : true,
59+
"OnlyOneTrailingClosureArgument" : true,
60+
"OrderedImports" : true,
61+
"ReplaceForEachWithForLoop" : true,
62+
"ReturnVoidInsteadOfEmptyTuple" : true,
63+
"UseEarlyExits" : false,
64+
"UseExplicitNilCheckInConditions" : false,
65+
"UseLetInEveryBoundCaseVariable" : false,
66+
"UseShorthandTypeNames" : true,
67+
"UseSingleLinePropertyGetter" : false,
68+
"UseSynthesizedInitializer" : false,
69+
"UseTripleSlashForDocumentationComments" : true,
70+
"UseWhereClausesInForLoops" : false,
71+
"ValidateDocumentationComments" : false
72+
}
73+
}

.swiftformat

-20
This file was deleted.

CONTRIBUTING.md

+3-6
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,6 @@ A good Swift Cluster Membership patch is:
5858
4. Adheres to our code formatting conventions and [style guide](STYLE_GUIDE.md).
5959
5. Accompanied by a great commit message, using our commit message template.
6060

61-
You should run the **`scripts/sanity.sh`** script before submitting your pull request. It will check formatting and other rules and fail if they are not in accordance to the project's rules, e.g. fixing all the formatting along the way.
62-
63-
Once the sanity script passes, you are ready to submit your pull request!
64-
6561
### Code Format and Style
6662

6763
Swift Cluster Membership uses [SwiftFormat](https://github.com/nicklockwood/SwiftFormat) to enforce the preferred [swift code format](.swiftformat). Always run SwiftFormat before committing your code.
@@ -72,9 +68,10 @@ We require that your commit messages match our template. The easiest way to do t
7268

7369
git config commit.template dev/git.commit.template
7470

75-
### Test on Linux
71+
### Run CI checks locally
7672

77-
Swift Cluster Membership uses XCTest to run tests on both macOS and Linux. While the macOS version of XCTest is able to use the Objective-C runtime to discover tests at execution time, the Linux version is not. For this reason, whenever you add new tests you will want to run a script that generates the hooks needed to run those tests on Linux, or our CI will complain that the tests are not all present on Linux. To do this, merely execute `./scripts/generate_linux_tests.rb` at the root of the package and check the changes it made.
73+
You can run the Github Actions workflows locally using
74+
[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).
7875

7976
## How to contribute your work
8077

CONTRIBUTORS.md CONTRIBUTORS.txt

File renamed without changes.

IntegrationTests/plugin_echo.sh

-58
This file was deleted.

0 commit comments

Comments
 (0)