Skip to content

Commit b2ae793

Browse files
Merge pull request #1 from SomeRandomiOSDev/update-actions
Updated GitHub Actions
2 parents 1c34d26 + fb70469 commit b2ae793

File tree

3 files changed

+59
-11
lines changed

3 files changed

+59
-11
lines changed

.github/workflows/cocoapods.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
name: Cocoapods
2-
on: [pull_request, push]
2+
on: push
33

44
jobs:
5-
build:
5+
lint:
6+
name: Lint
67
runs-on: macOS-latest
78
steps:
89
- name: Checkout Code

.github/workflows/swift-pacakge.yml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
name: Build Swift Package
2-
on: [pull_request, push]
2+
on: push
33

44
jobs:
55
build:
6+
name: Build
67
runs-on: macOS-latest
8+
79
steps:
810
- name: Checkout Code
911
uses: actions/checkout@v2
@@ -13,15 +15,26 @@ jobs:
1315
swift --version
1416
swift build -v
1517
18+
test:
19+
name: Test
20+
runs-on: macOS-latest
21+
needs: build
22+
23+
steps:
24+
- name: Checkout Code
25+
uses: actions/checkout@v2
26+
1627
- name: Test
1728
run: |
1829
swift test -v --enable-code-coverage
1930
2031
- name: Generate Code Coverage File
32+
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
2133
run: |
2234
xcrun llvm-cov export --instr-profile=.build/x86_64-apple-macosx/debug/codecov/default.profdata .build/x86_64-apple-macosx/debug/ProtocolProxyPackageTests.xctest/Contents/MacOS/ProtocolProxyPackageTests > ./info.lcov
2335
2436
- name: Upload Code Coverage
37+
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
2538
uses: codecov/codecov-action@v1
2639
with:
2740
token: ${{ secrets.CODECOV_TOKEN }}

.github/workflows/xcodebuild.yml

Lines changed: 42 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
name: Build Xcode Project
2-
on: [pull_request, push]
2+
on: push
33

44
jobs:
5-
build:
5+
ios:
6+
name: iOS
67
runs-on: macOS-latest
8+
79
steps:
810
- name: Checkout Code
911
uses: actions/checkout@v2
@@ -16,26 +18,50 @@ jobs:
1618
run: |
1719
xcodebuild -project ProtocolProxy.xcodeproj -scheme "ProtocolProxy" -sdk iphonesimulator -configuration Debug ONLY_ACTIVE_ARCH=YES
1820
19-
- name: Test iOS Simulator
21+
- name: Test
2022
run: |
2123
xcodebuild -project ProtocolProxy.xcodeproj -scheme "ProtocolProxy" -destination "platform=iOS Simulator,name=iPhone 11 Pro Max" -configuration Debug ONLY_ACTIVE_ARCH=YES test
2224
23-
- name: Build Mac Catalyst
25+
maccatalyst:
26+
name: Mac Catalyst
27+
runs-on: macOS-latest
28+
29+
steps:
30+
- name: Checkout Code
31+
uses: actions/checkout@v2
32+
33+
- name: Build
2434
run: |
2535
xcodebuild -project ProtocolProxy.xcodeproj -scheme "ProtocolProxy" -sdk macosx -configuration Debug ONLY_ACTIVE_ARCH=YES
2636
27-
- name: Test Mac Catalyst
37+
- name: Test
2838
run: |
2939
xcodebuild -project ProtocolProxy.xcodeproj -scheme "ProtocolProxy" -destination "platform=macOS" -configuration Debug ONLY_ACTIVE_ARCH=YES test
3040
31-
- name: Build macOS
41+
macos:
42+
name: macOS
43+
runs-on: macOS-latest
44+
45+
steps:
46+
- name: Checkout Code
47+
uses: actions/checkout@v2
48+
49+
- name: Build
3250
run: |
3351
xcodebuild -project ProtocolProxy.xcodeproj -scheme "ProtocolProxy macOS" -configuration Debug ONLY_ACTIVE_ARCH=YES
3452
35-
- name: Test macOS
53+
- name: Test
3654
run: |
3755
xcodebuild -project ProtocolProxy.xcodeproj -scheme "ProtocolProxy macOS" -configuration Debug ONLY_ACTIVE_ARCH=YES test
3856
57+
tvos:
58+
name: tvOS
59+
runs-on: macOS-latest
60+
61+
steps:
62+
- name: Checkout Code
63+
uses: actions/checkout@v2
64+
3965
- name: Build tvOS
4066
run: |
4167
xcodebuild -project ProtocolProxy.xcodeproj -scheme "ProtocolProxy tvOS" -sdk appletvos -configuration Debug ONLY_ACTIVE_ARCH=YES
@@ -44,10 +70,18 @@ jobs:
4470
run: |
4571
xcodebuild -project ProtocolProxy.xcodeproj -scheme "ProtocolProxy tvOS" -sdk appletvsimulator -configuration Debug ONLY_ACTIVE_ARCH=YES
4672
47-
- name: Test tvOS Simulator
73+
- name: Test
4874
run: |
4975
xcodebuild -project ProtocolProxy.xcodeproj -scheme "ProtocolProxy tvOS" -destination "platform=tvOS Simulator,name=Apple TV 4K" -configuration Debug ONLY_ACTIVE_ARCH=YES test
5076
77+
watchos:
78+
name: watchOS
79+
runs-on: macOS-latest
80+
81+
steps:
82+
- name: Checkout Code
83+
uses: actions/checkout@v2
84+
5185
- name: Build watchOS
5286
run: |
5387
xcodebuild -project ProtocolProxy.xcodeproj -scheme "ProtocolProxy watchOS" -sdk watchos -configuration Debug

0 commit comments

Comments
 (0)