Skip to content

Commit

Permalink
Merge pull request #17 from playbook-ui/feat/spm-support
Browse files Browse the repository at this point in the history
feat: Add support for Swift Package Manager
  • Loading branch information
ra1028 authored Aug 26, 2021
2 parents 84f341b + 8f7650d commit d9a2bb1
Show file tree
Hide file tree
Showing 19 changed files with 827 additions and 113 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
jobs:
publish:
name: Publish
runs-on: macOS-11.0
runs-on: macos-11
steps:
- name: Checkout
uses: actions/checkout@v2
Expand Down
62 changes: 34 additions & 28 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,30 +5,17 @@ on:
branches:
- main
jobs:
test:
name: Test on macOS
validation:
name: Validation
runs-on: macos-11
strategy:
matrix:
xcode_version:
- 12.4
- 12.5.1
env:
DEVELOPER_DIR: /Applications/Xcode_${{ matrix.xcode_version }}.app
steps:
- uses: actions/checkout@v2
- name: Show environments
run: |
swift --version
xcodebuild -version
- name: Get npm cache
id: npm-cache
uses: actions/cache@v2
with:
path: node_modules
key: ${{ runner.os }}-0-npm-${{ hashFiles('package-lock.json') }}
restore-keys: ${{ runner.os }}-0-npm-

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

- name: Get CocoaPods cache
id: cocoapods-cache
uses: actions/cache@v2
with:
path: Example/Pods
key: ${{ runner.os }}-1-cocoapods-${{ hashFiles('Example/Podfile.lock') }}
restore-keys: ${{ runner.os }}-1-cocoapods-

- name: Install npm packages
if: steps.npm-cache.cache.outputs.cache-hit != 'true'
run: make npm

- name: Install ruby gems
if: steps.gem-cache.cache.outputs.cache-hit != 'true'
run: make gem
Expand All @@ -68,8 +43,39 @@ jobs:
make lint
make pod-lib-lint
test:
name: Test on macOS
runs-on: macos-11
strategy:
matrix:
xcode_version:
- 12.4
- 12.5.1
env:
DEVELOPER_DIR: /Applications/Xcode_${{ matrix.xcode_version }}.app
steps:
- uses: actions/checkout@v2

- name: Show environments
run: |
swift --version
xcodebuild -version
- name: Get npm cache
id: npm-cache
uses: actions/cache@v2
with:
path: node_modules
key: ${{ runner.os }}-0-npm-${{ hashFiles('package-lock.json') }}
restore-keys: ${{ runner.os }}-0-npm-

- name: Install npm packages
if: steps.npm-cache.cache.outputs.cache-hit != 'true'
run: make npm

- name: Generate snapshots
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
working-directory: Example
run: xcodebuild test -scheme SampleApp -configuration Release -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 12 Pro' ENABLE_TESTABILITY=YES | xcpretty -c

- name: Visual regression test
if: matrix.xcode_version == '12.5.1'
Expand Down
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ build/
archive/
*.xcframework
*.xcworkspacedata
*.xcworkspace
*.xcodeproj

## Gem
.bundle
Expand Down
2 changes: 1 addition & 1 deletion .version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.2.0
0.2.1
Loading

0 comments on commit d9a2bb1

Please sign in to comment.