Skip to content

Commit d9a2bb1

Browse files
authored
Merge pull request #17 from playbook-ui/feat/spm-support
feat: Add support for Swift Package Manager
2 parents 84f341b + 8f7650d commit d9a2bb1

File tree

19 files changed

+827
-113
lines changed

19 files changed

+827
-113
lines changed

.github/workflows/publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55
jobs:
66
publish:
77
name: Publish
8-
runs-on: macOS-11.0
8+
runs-on: macos-11
99
steps:
1010
- name: Checkout
1111
uses: actions/checkout@v2

.github/workflows/test.yml

Lines changed: 34 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -5,30 +5,17 @@ on:
55
branches:
66
- main
77
jobs:
8-
test:
9-
name: Test on macOS
8+
validation:
9+
name: Validation
1010
runs-on: macos-11
1111
strategy:
1212
matrix:
1313
xcode_version:
14-
- 12.4
1514
- 12.5.1
1615
env:
1716
DEVELOPER_DIR: /Applications/Xcode_${{ matrix.xcode_version }}.app
1817
steps:
1918
- uses: actions/checkout@v2
20-
- name: Show environments
21-
run: |
22-
swift --version
23-
xcodebuild -version
24-
25-
- name: Get npm cache
26-
id: npm-cache
27-
uses: actions/cache@v2
28-
with:
29-
path: node_modules
30-
key: ${{ runner.os }}-0-npm-${{ hashFiles('package-lock.json') }}
31-
restore-keys: ${{ runner.os }}-0-npm-
3219

3320
- name: Get ruby gem cache
3421
id: gem-cache
@@ -45,18 +32,6 @@ jobs:
4532
key: ${{ runner.os }}-${{ matrix.xcode_version }}-1-spm-${{ hashFiles('Tools/Package.resolved') }}
4633
restore-keys: ${{ runner.os }}-${{ matrix.xcode_version }}-1-spm-
4734

48-
- name: Get CocoaPods cache
49-
id: cocoapods-cache
50-
uses: actions/cache@v2
51-
with:
52-
path: Example/Pods
53-
key: ${{ runner.os }}-1-cocoapods-${{ hashFiles('Example/Podfile.lock') }}
54-
restore-keys: ${{ runner.os }}-1-cocoapods-
55-
56-
- name: Install npm packages
57-
if: steps.npm-cache.cache.outputs.cache-hit != 'true'
58-
run: make npm
59-
6035
- name: Install ruby gems
6136
if: steps.gem-cache.cache.outputs.cache-hit != 'true'
6237
run: make gem
@@ -68,8 +43,39 @@ jobs:
6843
make lint
6944
make pod-lib-lint
7045
46+
test:
47+
name: Test on macOS
48+
runs-on: macos-11
49+
strategy:
50+
matrix:
51+
xcode_version:
52+
- 12.4
53+
- 12.5.1
54+
env:
55+
DEVELOPER_DIR: /Applications/Xcode_${{ matrix.xcode_version }}.app
56+
steps:
57+
- uses: actions/checkout@v2
58+
59+
- name: Show environments
60+
run: |
61+
swift --version
62+
xcodebuild -version
63+
64+
- name: Get npm cache
65+
id: npm-cache
66+
uses: actions/cache@v2
67+
with:
68+
path: node_modules
69+
key: ${{ runner.os }}-0-npm-${{ hashFiles('package-lock.json') }}
70+
restore-keys: ${{ runner.os }}-0-npm-
71+
72+
- name: Install npm packages
73+
if: steps.npm-cache.cache.outputs.cache-hit != 'true'
74+
run: make npm
75+
7176
- name: Generate snapshots
72-
run: xcodebuild test -workspace Example/Example.xcworkspace -scheme SampleApp -configuration Release -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 12 Pro' ENABLE_TESTABILITY=YES | xcpretty -c
77+
working-directory: Example
78+
run: xcodebuild test -scheme SampleApp -configuration Release -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 12 Pro' ENABLE_TESTABILITY=YES | xcpretty -c
7379

7480
- name: Visual regression test
7581
if: matrix.xcode_version == '12.5.1'

.gitignore

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

2624
## Gem
2725
.bundle

.version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.2.0
1+
0.2.1

0 commit comments

Comments
 (0)