Skip to content

Commit a2ed5ea

Browse files
authored
Move away from Fastlane for testing (#641)
* Remove fastfile and parallel testing * Also need to create parent dir * Install pods * Fix capitalization * Try chmod +x on artifact * Cocoapods caching * Also SPM caching * Fix conditional pod install
1 parent b393659 commit a2ed5ea

File tree

2 files changed

+73
-22
lines changed

2 files changed

+73
-22
lines changed

.github/workflows/checks.yml

Lines changed: 73 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,21 +10,91 @@ env:
1010
DEVELOPER_DIR: /Applications/Xcode_11.4.app/Contents/Developer
1111

1212
jobs:
13-
test:
13+
unit-tests:
1414
runs-on: macos-latest
1515
steps:
1616
- name: Checkout
1717
uses: actions/checkout@v2
18+
- name: Pull cache
19+
uses: actions/cache@v1
20+
with:
21+
path: .build
22+
key: ${{ runner.os }}-spm-${{ hashFiles('**/Package.resolved') }}
23+
restore-keys: |
24+
${{ runner.os }}-spm-
1825
- name: Test
19-
uses: maierj/fastlane-action@v1.4.0
26+
run: swift test -v
27+
28+
test-iOS:
29+
runs-on: macos-latest
30+
needs: build
31+
steps:
32+
- name: Checkout
33+
uses: actions/checkout@v2
34+
- name: Download build
35+
uses: actions/download-artifact@v1
2036
with:
21-
lane: runalltests
37+
name: rswift-dev
38+
- name: Put build into place
39+
run: |
40+
mkdir -p build/Debug
41+
mv rswift-dev/rswift build/Debug/rswift
42+
chmod +x build/Debug/rswift
43+
- name: Pull cache
44+
uses: actions/cache@v1
45+
id: pod-cache
46+
with:
47+
path: Pods
48+
key: ${{ runner.os }}-pods-${{ hashFiles('**/Podfile.lock') }}
49+
restore-keys: |
50+
${{ runner.os }}-pods-
51+
- name: Install pods
52+
if: steps.pod-cache.outputs.cache-hit != 'true'
53+
run: pod install
54+
- name: Test
55+
run: fastlane scan --workspace "ResourceApp.xcworkspace" --scheme "ResourceApp"
56+
57+
test-tvOS:
58+
runs-on: macos-latest
59+
needs: build
60+
steps:
61+
- name: Checkout
62+
uses: actions/checkout@v2
63+
- name: Download build
64+
uses: actions/download-artifact@v1
65+
with:
66+
name: rswift-dev
67+
- name: Put build into place
68+
run: |
69+
mkdir -p build/Debug
70+
mv rswift-dev/rswift build/Debug/rswift
71+
chmod +x build/Debug/rswift
72+
- name: Pull cache
73+
uses: actions/cache@v1
74+
id: pod-cache
75+
with:
76+
path: Pods
77+
key: ${{ runner.os }}-pods-${{ hashFiles('**/Podfile.lock') }}
78+
restore-keys: |
79+
${{ runner.os }}-pods-
80+
- name: Install pods
81+
if: steps.pod-cache.outputs.cache-hit != 'true'
82+
run: pod install
83+
- name: Test
84+
run: fastlane scan --workspace "ResourceApp.xcworkspace" --scheme "ResourceApp-tvOS"
2285

2386
build:
2487
runs-on: macos-latest
2588
steps:
2689
- name: Checkout
2790
uses: actions/checkout@v2
91+
- name: Pull cache
92+
uses: actions/cache@v1
93+
with:
94+
path: .build
95+
key: ${{ runner.os }}-spm-${{ hashFiles('**/Package.resolved') }}
96+
restore-keys: |
97+
${{ runner.os }}-spm-
2898
- name: Set version
2999
run: |
30100
sed -i "" "s/\(static let version = \"\)Unknown\(\"\)/\1Development build: ${GITHUB_SHA}\2/" Sources/rswift/Rswift.swift

fastlane/Fastfile

Lines changed: 0 additions & 19 deletions
This file was deleted.

0 commit comments

Comments
 (0)