Skip to content

Commit 9b37636

Browse files
committed
migrate to github actions
1 parent c8f217f commit 9b37636

File tree

5 files changed

+131
-0
lines changed

5 files changed

+131
-0
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
_[One line description of your change]_
2+
3+
### Motivation:
4+
5+
_[Explain here the context, and why you're making that change. What is the problem you're trying to solve.]_
6+
7+
### Modifications:
8+
9+
_[Describe the modifications you've done.]_
10+
11+
### Result:
12+
13+
- Resolves #
14+
- _[After your change, what will change.]_

.github/workflows/pull_request.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
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: "RediStack"
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"
19+
linux_5_10_arguments_override: "-Xswiftc -warnings-as-errors --explicit-target-dependency-import-check error"
20+
linux_6_0_arguments_override: "-Xswiftc -warnings-as-errors --explicit-target-dependency-import-check error -Xswiftc -require-explicit-sendable"
21+
linux_nightly_6_0_arguments_override: "--explicit-target-dependency-import-check error -Xswiftc -require-explicit-sendable"
22+
linux_nightly_main_arguments_override: "--explicit-target-dependency-import-check error -Xswiftc -require-explicit-sendable"
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

.swift-format

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
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" : 120,
20+
"maximumBlankLines" : 1,
21+
"respectsExistingLineBreaks" : true,
22+
"prioritizeKeepingFunctionOutputTogether" : true,
23+
"noAssignmentInExpressions" : {
24+
"allowedFunctions" : [
25+
"XCTAssertNoThrow",
26+
"XCTAssertThrowsError"
27+
]
28+
},
29+
"rules" : {
30+
"AllPublicDeclarationsHaveDocumentation" : false,
31+
"AlwaysUseLiteralForEmptyCollectionInit" : false,
32+
"AlwaysUseLowerCamelCase" : false,
33+
"AmbiguousTrailingClosureOverload" : true,
34+
"BeginDocumentationCommentWithOneLineSummary" : false,
35+
"DoNotUseSemicolons" : true,
36+
"DontRepeatTypeInStaticProperties" : true,
37+
"FileScopedDeclarationPrivacy" : true,
38+
"FullyIndirectEnum" : true,
39+
"GroupNumericLiterals" : true,
40+
"IdentifiersMustBeASCII" : true,
41+
"NeverForceUnwrap" : false,
42+
"NeverUseForceTry" : false,
43+
"NeverUseImplicitlyUnwrappedOptionals" : false,
44+
"NoAccessLevelOnExtensionDeclaration" : true,
45+
"NoAssignmentInExpressions" : true,
46+
"NoBlockComments" : true,
47+
"NoCasesWithOnlyFallthrough" : true,
48+
"NoEmptyTrailingClosureParentheses" : true,
49+
"NoLabelsInCasePatterns" : true,
50+
"NoLeadingUnderscores" : false,
51+
"NoParensAroundConditions" : true,
52+
"NoVoidReturnOnFunctionSignature" : true,
53+
"OmitExplicitReturns" : true,
54+
"OneCasePerLine" : true,
55+
"OneVariableDeclarationPerLine" : true,
56+
"OnlyOneTrailingClosureArgument" : true,
57+
"OrderedImports" : true,
58+
"ReplaceForEachWithForLoop" : true,
59+
"ReturnVoidInsteadOfEmptyTuple" : true,
60+
"UseEarlyExits" : false,
61+
"UseExplicitNilCheckInConditions" : false,
62+
"UseLetInEveryBoundCaseVariable" : false,
63+
"UseShorthandTypeNames" : true,
64+
"UseSingleLinePropertyGetter" : false,
65+
"UseSynthesizedInitializer" : false,
66+
"UseTripleSlashForDocumentationComments" : true,
67+
"UseWhereClausesInForLoops" : false,
68+
"ValidateDocumentationComments" : false
69+
}
70+
}

.yamllint.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
extends: default
2+
3+
rules:
4+
line-length: false
5+
document-start: false
6+
truthy:
7+
check-keys: false # Otherwise we get a false positive on GitHub action's `on` key

0 commit comments

Comments
 (0)