Skip to content

Commit 9fbd84a

Browse files
authored
Update GitHub Actions Workflow (#10)
* Add support for Swift 5.8 * Update GitHub Actions workflow * Update `CHANGELOG.md` * Update the Ruby version from `2.7` to `3.1.4` * Fix typos
1 parent 012809c commit 9fbd84a

6 files changed

Lines changed: 202 additions & 28 deletions

File tree

.github/workflows/ci.yml

Lines changed: 160 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -24,39 +24,176 @@ jobs:
2424
args: --strict
2525
env:
2626
DIFF_BASE: ${{ github.base_ref }}
27-
Latest:
28-
name: Test Latest (iOS, macOS, tvOS, watchOS)
29-
runs-on: macOS-12
27+
macOS:
28+
name: ${{ matrix.name }}
29+
runs-on: ${{ matrix.runsOn }}
30+
env:
31+
DEVELOPER_DIR: "/Applications/${{ matrix.xcode }}.app/Contents/Developer"
32+
timeout-minutes: 20
33+
strategy:
34+
fail-fast: false
35+
matrix:
36+
include:
37+
- xcode: "Xcode_15.0"
38+
runsOn: macos-13
39+
name: "macOS 13, Xcode 15.0, Swift 5.9.0"
40+
- xcode: "Xcode_14.3.1"
41+
runsOn: macos-13
42+
name: "macOS 13, Xcode 14.3.1, Swift 5.8.0"
43+
steps:
44+
- uses: actions/checkout@v3
45+
- name: ${{ matrix.name }}
46+
run: xcodebuild test -scheme "Atomic" -destination "platform=macOS" clean -enableCodeCoverage YES -resultBundlePath "test_output/${{ matrix.name }}.xcresult" || exit 1
47+
- name: Upload coverage reports to Codecov
48+
uses: codecov/codecov-action@v3.1.0
49+
with:
50+
token: ${{ secrets.CODECOV_TOKEN }}
51+
xcode: true
52+
xcode_archive_path: test_output/${{ matrix.name }}.xcresult
53+
- uses: actions/upload-artifact@v4
54+
with:
55+
name: ${{ matrix.name }}
56+
path: test_output
57+
58+
iOS:
59+
name: ${{ matrix.name }}
60+
runs-on: ${{ matrix.runsOn }}
3061
env:
31-
DEVELOPER_DIR: "/Applications/Xcode_14.1.app/Contents/Developer"
32-
timeout-minutes: 10
62+
DEVELOPER_DIR: "/Applications/${{ matrix.xcode }}.app/Contents/Developer"
63+
timeout-minutes: 20
3364
strategy:
3465
fail-fast: false
3566
matrix:
3667
include:
37-
- destination: "OS=16.1,name=iPhone 14 Pro"
38-
name: "iOS"
39-
scheme: "Atomic"
40-
sdk: iphonesimulator
41-
- destination: "OS=16.1,name=Apple TV"
42-
name: "tvOS"
43-
scheme: "Atomic"
44-
sdk: appletvsimulator
45-
- destination: "OS=9.1,name=Apple Watch Series 8 (45mm)"
46-
name: "watchOS"
47-
scheme: "Atomic"
48-
sdk: watchsimulator
49-
- destination: "platform=macOS"
50-
name: "macOS"
51-
scheme: "Atomic"
52-
sdk: macosx
68+
- destination: "OS=17.0.1,name=iPhone 14 Pro"
69+
name: "iOS 17.0.1"
70+
xcode: "Xcode_15.0"
71+
runsOn: macos-13
72+
- destination: "OS=16.4,name=iPhone 14 Pro"
73+
name: "iOS 16.4"
74+
xcode: "Xcode_14.3.1"
75+
runsOn: macos-13
5376
steps:
5477
- uses: actions/checkout@v3
5578
- name: ${{ matrix.name }}
56-
run: xcodebuild test -scheme "${{ matrix.scheme }}" -destination "${{ matrix.destination }}" clean -enableCodeCoverage YES -resultBundlePath "./${{ matrix.sdk }}.xcresult"
79+
run: xcodebuild test -scheme "Atomic" -destination "${{ matrix.destination }}" clean -enableCodeCoverage YES -resultBundlePath "test_output/${{ matrix.name }}.xcresult" || exit 1
80+
- uses: actions/upload-artifact@v4
81+
with:
82+
name: ${{ matrix.name }}
83+
path: test_output
84+
85+
tvOS:
86+
name: ${{ matrix.name }}
87+
runs-on: ${{ matrix.runsOn }}
88+
env:
89+
DEVELOPER_DIR: "/Applications/${{ matrix.xcode }}.app/Contents/Developer"
90+
timeout-minutes: 20
91+
strategy:
92+
fail-fast: false
93+
matrix:
94+
include:
95+
- destination: "OS=17.0,name=Apple TV"
96+
name: "tvOS 17.0"
97+
xcode: "Xcode_15.0"
98+
runsOn: macos-13
99+
- destination: "OS=16.4,name=Apple TV"
100+
name: "tvOS 16.4"
101+
xcode: "Xcode_14.3.1"
102+
runsOn: macos-13
103+
steps:
104+
- uses: actions/checkout@v3
105+
- name: ${{ matrix.name }}
106+
run: xcodebuild test -scheme "Atomic" -destination "${{ matrix.destination }}" clean -enableCodeCoverage YES -resultBundlePath "test_output/${{ matrix.name }}.xcresult" || exit 1
57107
- name: Upload coverage reports to Codecov
58108
uses: codecov/codecov-action@v3.1.0
59109
with:
60110
token: ${{ secrets.CODECOV_TOKEN }}
61111
xcode: true
62-
xcode_archive_path: "./${{ matrix.sdk }}.xcresult"
112+
xcode_archive_path: test_output/${{ matrix.name }}.xcresult
113+
- uses: actions/upload-artifact@v4
114+
with:
115+
name: ${{ matrix.name }}
116+
path: test_output
117+
118+
watchOS:
119+
name: ${{ matrix.name }}
120+
runs-on: ${{ matrix.runsOn }}
121+
env:
122+
DEVELOPER_DIR: "/Applications/${{ matrix.xcode }}.app/Contents/Developer"
123+
timeout-minutes: 20
124+
strategy:
125+
fail-fast: false
126+
matrix:
127+
include:
128+
- destination: "OS=10.0,name=Apple Watch Series 9 (45mm)"
129+
name: "watchOS 10.0"
130+
xcode: "Xcode_15.0"
131+
runsOn: macos-13
132+
- destination: "OS=9.4,name=Apple Watch Series 8 (45mm)"
133+
name: "watchOS 9.4"
134+
xcode: "Xcode_14.3.1"
135+
runsOn: macos-13
136+
steps:
137+
- uses: actions/checkout@v3
138+
- name: ${{ matrix.name }}
139+
run: xcodebuild test -scheme "Atomic" -destination "${{ matrix.destination }}" clean -enableCodeCoverage YES -resultBundlePath "test_output/${{ matrix.name }}.xcresult" || exit 1
140+
- name: Upload coverage reports to Codecov
141+
uses: codecov/codecov-action@v3.1.0
142+
with:
143+
token: ${{ secrets.CODECOV_TOKEN }}
144+
xcode: true
145+
xcode_archive_path: test_output/${{ matrix.name }}.xcresult
146+
- uses: actions/upload-artifact@v4
147+
with:
148+
name: ${{ matrix.name }}
149+
path: test_output
150+
151+
spm:
152+
name: ${{ matrix.name }}
153+
runs-on: ${{ matrix.runsOn }}
154+
env:
155+
DEVELOPER_DIR: "/Applications/${{ matrix.xcode }}.app/Contents/Developer"
156+
timeout-minutes: 20
157+
strategy:
158+
fail-fast: false
159+
matrix:
160+
include:
161+
- name: "Xcode 15"
162+
xcode: "Xcode_15.0"
163+
runsOn: macos-13
164+
- name: "Xcode 14"
165+
xcode: "Xcode_14.3.1"
166+
runsOn: macos-13
167+
steps:
168+
- uses: actions/checkout@v3
169+
- name: ${{ matrix.name }}
170+
run: swift build -c release
171+
172+
merge-test-reports:
173+
needs: [iOS, macOS, watchOS, tvOS]
174+
runs-on: macos-13
175+
steps:
176+
- name: Download artifacts
177+
uses: actions/download-artifact@v4
178+
with:
179+
path: test_output
180+
- run: xcrun xcresulttool merge test_output/**/*.xcresult --output-path test_output/final/final.xcresult
181+
- name: Upload Merged Artifact
182+
uses: actions/upload-artifact@v4
183+
with:
184+
name: MergedResult
185+
path: test_output/final
186+
187+
discover-typos:
188+
name: Discover Typos
189+
runs-on: macOS-12
190+
env:
191+
DEVELOPER_DIR: /Applications/Xcode_14.1.app/Contents/Developer
192+
steps:
193+
- uses: actions/checkout@v2
194+
- name: Discover typos
195+
run: |
196+
export PATH="$PATH:/Library/Frameworks/Python.framework/Versions/3.11/bin"
197+
python3 -m pip install --upgrade pip
198+
python3 -m pip install codespell
199+
codespell --ignore-words-list="hart,inout,msdos,sur" --skip="./.build/*,./.git/*"

.github/workflows/danger.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
- name: ruby setup
1616
uses: ruby/setup-ruby@v1
1717
with:
18-
ruby-version: 2.7
18+
ruby-version: 3.1.4
1919
bundler-cache: true
2020
- name: Checkout code
2121
uses: actions/checkout@v2

.swiftlint.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ excluded:
33
- Package.swift
44
- .build
55
- Package@swift-5.7.swift
6+
- Package@swift-5.8.swift
67

78
# Rules
89

CHANGELOG.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,22 @@
11
# Change Log
22
All notable changes to this project will be documented in this file.
33

4-
#### 1.0.x Releases
5-
- `1.0.x` Releases - [1.0.0](#100)
4+
5+
#### 1.x Releases
6+
- `1.0.1` Releases - [1.0.0](#100) | [1.0.1](#101)
67

78
#### 0.0.x Releases
89
- `0.0.x` Releases - [0.0.1](#001)
910

1011
---
1112

13+
## [1.0.1](https://github.com/space-code/atomic/releases/tag/1.0.1)
14+
Released on 2024-01-23.
15+
16+
## Added
17+
- Update GitHub Actions Workflow
18+
- Added in Pull Request [#10](https://github.com/space-code/atomic/pull/10).
19+
1220
## [1.0.0](https://github.com/space-code/atomic/releases/tag/1.0.0)
1321
Released on 2023-11-06.
1422

Package@swift-5.8.swift

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
// swift-tools-version: 5.8
2+
// The swift-tools-version declares the minimum version of Swift required to build this package.
3+
4+
import PackageDescription
5+
6+
let package = Package(
7+
name: "Atomic",
8+
platforms: [
9+
.macOS(.v10_15),
10+
.iOS(.v13),
11+
.watchOS(.v6),
12+
.tvOS(.v11),
13+
],
14+
products: [
15+
.library(name: "Atomic", targets: ["Atomic"]),
16+
],
17+
dependencies: [],
18+
targets: [
19+
.target(
20+
name: "Atomic",
21+
dependencies: []
22+
),
23+
.testTarget(
24+
name: "AtomicTests",
25+
dependencies: ["Atomic"]
26+
),
27+
]
28+
)

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
<p align="center">
44
<a href="https://github.com/space-code/atomic/blob/main/LICENSE"><img alt="License" src="https://img.shields.io/github/license/space-code/atomic?style=flat"></a>
5-
<a href="https://swiftpackageindex.com/space-code/atomic"><img alt="Swift Compability" src="https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2Fspace-code%2Fatomic%2Fbadge%3Ftype%3Dswift-versions">
6-
<a href="https://swiftpackageindex.com/space-code/atomic"><img alt="Platform Compability" src="https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2Fspace-code%2Fatomic%2Fbadge%3Ftype%3Dplatforms">
5+
<a href="https://swiftpackageindex.com/space-code/atomic"><img alt="Swift Compatibility" src="https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2Fspace-code%2Fatomic%2Fbadge%3Ftype%3Dswift-versions">
6+
<a href="https://swiftpackageindex.com/space-code/atomic"><img alt="Platform Compatibility" src="https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2Fspace-code%2Fatomic%2Fbadge%3Ftype%3Dplatforms">
77
<a href="https://github.com/space-code/atomic"><img alt="CI" src="https://github.com/space-code/atomic/actions/workflows/ci.yml/badge.svg?branch=main"></a>
88
<a href="https://codecov.io/gh/space-code/atomic"><img alt="CodeCov" src="https://codecov.io/gh/space-code/atomic/graph/badge.svg?token=XEAA2PB5PP"></a>
99
</p>

0 commit comments

Comments
 (0)