Skip to content

Commit 1767a56

Browse files
authored
Use swiftformat (#14)
1 parent 55c1e3e commit 1767a56

File tree

8 files changed

+488
-480
lines changed

8 files changed

+488
-480
lines changed

.github/workflows/ci.yaml

Lines changed: 23 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -9,32 +9,40 @@ on:
99

1010
jobs:
1111

12+
"sanity-Tests":
13+
runs-on: macOS-latest
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v2
17+
- name: Install swiftformat
18+
run: brew install swiftformat
19+
- name: Run sanity
20+
run: ./scripts/sanity.sh .
21+
1222
"tuxOS-Tests":
1323
runs-on: ubuntu-latest
1424
strategy:
1525
matrix:
1626
images:
1727
- swift:5.1
1828
- swift:5.2
29+
- swiftlang/swift:nightly-5.3-bionic
30+
- swiftlang/swift:nightly-amazonlinux2
1931
container:
2032
image: ${{ matrix.images }}
21-
volumes:
22-
- $GITHUB_WORKSPACE:/src
23-
options: --workdir /src
2433
steps:
2534
- name: Checkout
26-
uses: actions/checkout@v1
27-
with:
28-
fetch-depth: 1
35+
uses: actions/checkout@v2
2936
- name: Test
3037
run: swift test --enable-code-coverage --enable-test-discovery
3138
- name: Convert coverage files
3239
run: llvm-cov export -format="lcov" .build/debug/swift-base64-kitPackageTests.xctest -instr-profile .build/debug/codecov/default.profdata > info.lcov
40+
- name: Install curl
41+
if: matrix.images != 'swiftlang/swift:nightly-amazonlinux2'
42+
run: apt-get update && apt-get install -y curl # required by the codecov action.
3343
- name: Upload to codecov.io
34-
uses: codecov/codecov-action@v1.0.3
44+
uses: codecov/codecov-action@v1
3545
with:
36-
token: ${{secrets.CODECOV_TOKEN}}
37-
flags: base64,unittests
3846
file: info.lcov
3947

4048
"tuxOS-Performance-Tests":
@@ -44,16 +52,13 @@ jobs:
4452
images:
4553
- swift:5.1
4654
- swift:5.2
55+
- swiftlang/swift:nightly-5.3-bionic
56+
- swiftlang/swift:nightly-amazonlinux2
4757
container:
4858
image: ${{ matrix.images }}
49-
volumes:
50-
- $GITHUB_WORKSPACE:/src
51-
options: --workdir /src
5259
steps:
5360
- name: Checkout
54-
uses: actions/checkout@v1
55-
with:
56-
fetch-depth: 1
61+
uses: actions/checkout@v2
5762
- name: Build
5863
run: swift build -c release
5964
- name: Run test
@@ -63,9 +68,7 @@ jobs:
6368
runs-on: macOS-latest
6469
steps:
6570
- name: Checkout
66-
uses: actions/checkout@v1
67-
with:
68-
fetch-depth: 1
71+
uses: actions/checkout@v2
6972
- name: Show all Xcode versions
7073
run: ls -an /Applications/ | grep Xcode*
7174
- name: Change Xcode command line tools
@@ -79,15 +82,13 @@ jobs:
7982
swift package generate-xcodeproj
8083
xcodebuild -quiet -parallel-testing-enabled YES -scheme swift-base64-kit-Package -enableCodeCoverage YES build test
8184
- name: Codecov
82-
run: bash <(curl -s https://codecov.io/bash) -t ${{secrets.CODECOV_TOKEN}} -F base64,unittests -f *.coverage.txt
85+
run: bash <(curl -s https://codecov.io/bash) -t ${{secrets.CODECOV_TOKEN}} -f *.coverage.txt
8386

8487
"macOS-Performance-Tests":
8588
runs-on: macOS-latest
8689
steps:
8790
- name: Checkout
88-
uses: actions/checkout@v1
89-
with:
90-
fetch-depth: 1
91+
uses: actions/checkout@v2
9192
- name: Build
9293
run: swift build -c release
9394
- name: Run test

Package.swift

Lines changed: 22 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,26 @@
44
import PackageDescription
55

66
let package = Package(
7-
name: "swift-base64-kit",
8-
products: [
9-
.library(
10-
name: "Base64Kit",
11-
targets: ["Base64Kit"]),
12-
],
13-
dependencies: [],
14-
targets: [
15-
.target(
16-
name: "Base64KitPerformanceTest",
17-
dependencies: ["Base64Kit"]),
18-
.target(
19-
name: "Base64Kit",
20-
dependencies: []),
21-
.testTarget(
22-
name: "Base64KitTests",
23-
dependencies: ["Base64Kit"]),
24-
]
7+
name: "swift-base64-kit",
8+
products: [
9+
.library(
10+
name: "Base64Kit",
11+
targets: ["Base64Kit"]
12+
),
13+
],
14+
dependencies: [],
15+
targets: [
16+
.target(
17+
name: "Base64KitPerformanceTest",
18+
dependencies: ["Base64Kit"]
19+
),
20+
.target(
21+
name: "Base64Kit",
22+
dependencies: []
23+
),
24+
.testTarget(
25+
name: "Base64KitTests",
26+
dependencies: ["Base64Kit"]
27+
),
28+
]
2529
)

0 commit comments

Comments
 (0)