Skip to content

Commit 821e8ed

Browse files
committed
Fix for CI validation
1 parent c6dbdb6 commit 821e8ed

File tree

10 files changed

+31
-821
lines changed

10 files changed

+31
-821
lines changed

.github/workflows/test.yml

Lines changed: 12 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -5,45 +5,6 @@ on:
55
branches:
66
- main
77
jobs:
8-
validation:
9-
name: Validation
10-
runs-on: macOS-11.0
11-
strategy:
12-
matrix:
13-
xcode_version:
14-
- "12.2"
15-
env:
16-
DEVELOPER_DIR: /Applications/Xcode_${{ matrix.xcode_version }}.app
17-
steps:
18-
- uses: actions/checkout@v2
19-
20-
- name: Get ruby gem cache
21-
id: gem-cache
22-
uses: actions/cache@v2
23-
with:
24-
path: vendor/bundle
25-
key: ${{ runner.os }}-1-gem-${{ hashFiles('Gemfile.lock') }}
26-
restore-keys: ${{ runner.os }}-1-gem-
27-
28-
- name: Install ruby gems
29-
if: steps.gem-cache.cache.outputs.cache-hit != 'true'
30-
run: make gem
31-
32-
- name: Get SwiftPM cache
33-
uses: actions/cache@v2
34-
with:
35-
path: Tools/.build
36-
key: ${{ runner.os }}-${{ matrix.xcode_version }}-1-spm-${{ hashFiles('Tools/Package.resolved') }}
37-
restore-keys: ${{ runner.os }}-${{ matrix.xcode_version }}-1-spm-
38-
39-
- name: Podspec lint
40-
run: make pod-lib-lint
41-
42-
- name: Validation
43-
run: make all && [ -z "$(git status --porcelain)" ] && make lint
44-
env:
45-
SPM_FORCE_BUILD: 1
46-
478
test:
489
name: Test on macOS
4910
runs-on: macOS-11.0
@@ -76,6 +37,13 @@ jobs:
7637
key: ${{ runner.os }}-0-npm-${{ hashFiles('package-lock.json') }}
7738
restore-keys: ${{ runner.os }}-0-npm-
7839

40+
- name: Get SwiftPM cache
41+
uses: actions/cache@v2
42+
with:
43+
path: Tools/.build
44+
key: ${{ runner.os }}-${{ matrix.xcode_version }}-1-spm-${{ hashFiles('Tools/Package.resolved') }}
45+
restore-keys: ${{ runner.os }}-${{ matrix.xcode_version }}-1-spm-
46+
7947
- name: Get CocoaPods cache
8048
id: cocoapods-cache
8149
uses: actions/cache@v2
@@ -92,9 +60,11 @@ jobs:
9260
if: steps.gem-cache.cache.outputs.cache-hit != 'true'
9361
run: make gem
9462

95-
- name: Install CocoaPods packages
96-
if: steps.cocoapods-cache.cache.outputs.cache-hit != 'true'
97-
run: make pod-install
63+
- name: Podspec lint
64+
run: make pod-lib-lint
65+
66+
- name: Validation
67+
run: make all && [ -z "$(git status --porcelain)" ] && make lint
9868

9969
- name: Generate snapshots
10070
run: set -o pipefail && xcodebuild build-for-testing test-without-building -workspace Example/Example.xcworkspace -scheme SampleApp -configuration Release -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 12 Pro' ENABLE_TESTABILITY=YES | xcpretty -c

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ build/
2020
archive/
2121
*.xcframework
2222
*.xcworkspacedata
23+
*.xcworkspace
24+
*.xcodeproj
2325

2426
## Gem
2527
.bundle

Example/Example.xcodeproj/project.pbxproj

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

Example/Example.xcodeproj/xcshareddata/xcschemes/SampleApp.xcscheme

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

Example/Example.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist

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

Example/Podfile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
1-
use_frameworks!
21
platform :ios, '14.0'
32
source 'https://cdn.cocoapods.org/'
3+
use_frameworks!
4+
inhibit_all_warnings!
5+
6+
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
47

58
target 'SampleApp' do
69
inherit! :search_paths
@@ -11,6 +14,5 @@ end
1114
target 'SampleAccessibilitySnapshot' do
1215
inherit! :search_paths
1316

14-
pod 'PlaybookSnapshot', '~> 0.2.0'
1517
pod 'PlaybookAccessibilitySnapshot', :path => '../PlaybookAccessibilitySnapshot.podspec'
1618
end

Example/Podfile.lock

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ PODS:
1212
DEPENDENCIES:
1313
- Playbook (~> 0.2.0)
1414
- PlaybookAccessibilitySnapshot (from `../PlaybookAccessibilitySnapshot.podspec`)
15-
- PlaybookSnapshot (~> 0.2.0)
1615

1716
SPEC REPOS:
1817
trunk:
@@ -32,6 +31,6 @@ SPEC CHECKSUMS:
3231
PlaybookAccessibilitySnapshot: a2c8e153a1bae7e9e1527d5f37f272bd3f3cdfcd
3332
PlaybookSnapshot: 5a1caa4eab596c0da23613b15c506bdbeeedc8c0
3433

35-
PODFILE CHECKSUM: faa37e96a1de8eb0b94cdf3058d4e2a635174bf9
34+
PODFILE CHECKSUM: f338bdd8abed3a3355aaa32bab8dc4ee0137d714
3635

3736
COCOAPODS: 1.10.0

Example/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# How to Run
22

3-
1. Run `make all` at the root of this repository.
3+
1. Run `make proj` at the root of this repository.
44
1. Open `Example.xcworkspace` via Xcode.
55
1. Test (⌘+U) `SampleApp` scheme to generate accessibility snapshot images.

Makefile

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,20 @@ GITHUB_RAW_CONTENT_PATH := https://raw.githubusercontent.com/playbook-ui/accessi
33
GITHUB_TREE_PATH := https://github.com/playbook-ui/accessibility-snapshot-ios/main/
44

55
.PHONY: all
6-
all: proj pod-install mod format
6+
all: proj format
77

88
.PHONY: proj
99
proj:
1010
$(SWIFT_TOOL) xcodegen --spec Example/project.yml --project Example
11+
make pod-install
1112

1213
.PHONY: pod-install
1314
pod-install:
1415
bundle exec pod install --project-directory=Example || bundle exec pod install --repo-update --project-directory=Example
1516

16-
.PHONY: mod
17-
mod:
18-
$(SWIFT_TOOL) swift-mod
19-
2017
.PHONY: format
2118
format:
19+
$(SWIFT_TOOL) swift-mod
2220
$(SWIFT_TOOL) swift-format --configuration .swift-format.json -i -r -m format Sources Example/SampleAccessibilitySnapshot
2321

2422
.PHONY: lint

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,14 @@ end
7676

7777
---
7878

79+
## Development
80+
81+
1. Run `make proj` at the root of this repository.
82+
1. Open `Example/Example.xcworkspace` via Xcode.
83+
1. Develop a PlaybookAccessibilitySnapshot installed as a development pods.
84+
85+
---
86+
7987
## License
8088

8189
Playbook is released under the [Apache 2.0 License](https://github.com/playbook-ui/accessibility-snapshot-ios/tree/main/LICENSE).

0 commit comments

Comments
 (0)