refactor: migrate exmaple project to [email protected]+ #560
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI / Example iOS | |
on: | |
push: | |
branches: [main, next] | |
paths: | |
- 'src/**' | |
- 'ios/**' | |
- 'IapExample/ios/**' | |
- .github/ci-example-ios.yml | |
pull_request: | |
types: [opened, synchronize, reopened] | |
paths: | |
- 'src/**' | |
- 'ios/**' | |
- 'IapExample/ios/**' | |
- .github/ci-example-ios.yml | |
jobs: | |
build_ios_example: | |
runs-on: macos-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Setup Node.js | |
uses: actions/setup-node@v3 | |
with: | |
cache: 'yarn' | |
- name: Install dependencies | |
run: yarn install --immutable | |
- name: Install dependencies for `IapExample/` | |
run: yarn install --immutable | |
working-directory: IapExample | |
- name: Restore buildcache | |
uses: mikehardy/buildcache-action@v2 | |
continue-on-error: true | |
- name: Setup Ruby (bundle) | |
uses: ruby/setup-ruby@v1 | |
with: | |
working-directory: IapExample | |
bundler-cache: true | |
- name: SwiftLint | |
run: swiftlint lint --fix --format --path ios/*.swift --config .swiftlint.yml | |
- name: Verify no files have changed after auto-fix | |
run: git diff --exit-code HEAD '*.swift' | |
- name: Restore Pods cache | |
uses: actions/cache@v3 | |
with: | |
path: | | |
IapExample/ios/Pods | |
~/Library/Caches/CocoaPods | |
~/.cocoapods | |
key: ${{ runner.os }}-pods-${{ hashFiles('**/Podfile.lock') }} | |
restore-keys: ${{ runner.os }}-pods- | |
- name: Install Pods | |
run: bundle exec pod install | |
working-directory: IapExample/ios | |
- name: Install xcpretty | |
run: gem install xcpretty | |
working-directory: IapExample/ios | |
- name: Build App | |
run: "set -o pipefail && xcodebuild \ | |
CC=clang CPLUSPLUS=clang++ LD=clang LDPLUSPLUS=clang++ \ | |
-derivedDataPath build -UseModernBuildSystem=YES \ | |
-workspace IapExample.xcworkspace \ | |
-scheme IapExample \ | |
-sdk iphonesimulator \ | |
-configuration Debug \ | |
-destination 'platform=iOS Simulator,name=iPhone 11 Pro' \ | |
build \ | |
CODE_SIGNING_ALLOWED=NO | xcpretty" | |
working-directory: IapExample/ios |