[dnm] add kingfisher #1313
This file contains hidden or 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: Emerge PR iOS Upload (Snapshots) | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| paths: [ios/**, .github/workflows/ios*] | |
| jobs: | |
| upload_emerge_snapshots: | |
| runs-on: macos-15 | |
| defaults: | |
| run: | |
| working-directory: ./ios | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - name: Select Xcode version | |
| run: sudo xcode-select -s '/Applications/Xcode_16.2.app/Contents/Developer' | |
| - name: Download iOS platform | |
| run: xcodebuild -downloadPlatform iOS | |
| - name: Set up Ruby env | |
| uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: 3.3.10 | |
| bundler-cache: true | |
| - name: Setup gems | |
| run: exec ../.github/scripts/ios/setup.sh | |
| - name: Build & upload iOS snapshot binary to Emerge Tools | |
| run: bundle exec fastlane ios build_upload_emerge_snapshot | |
| env: | |
| EMERGE_API_TOKEN: ${{ secrets.EMERGE_API_KEY }} | |
| upload_swift_snapshot_testing_snapshots: | |
| runs-on: macos-15 | |
| defaults: | |
| run: | |
| working-directory: ./ios | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - name: Select Xcode version | |
| run: sudo xcode-select -s '/Applications/Xcode_16.2.app/Contents/Developer' | |
| - name: Download iOS platform | |
| run: xcodebuild -downloadPlatform iOS | |
| - name: Ruby setup | |
| uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: 3.3.10 | |
| bundler-cache: true | |
| - name: Install gems | |
| run: gem install xcpretty emerge | |
| - name: Set up App Store Connect API Key | |
| run: | | |
| ABSOLUTE_KEY_PATH="$(pwd)/app_store_key.p8" | |
| echo "${{ secrets.ASC_PRIVATE_KEY }}" > "$ABSOLUTE_KEY_PATH" | |
| echo "AUTH_KEY_PATH=$ABSOLUTE_KEY_PATH" >> $GITHUB_ENV | |
| - name: Generate new snapshots | |
| env: | |
| APP_STORE_KEY_ID: ${{ secrets.ASC_KEY_ID }} | |
| APP_STORE_ISSUER_ID: ${{ secrets.ASC_ISSUER_ID }} | |
| run: | | |
| set -o pipefail && xcodebuild test \ | |
| -scheme HackerNews \ | |
| -sdk iphonesimulator \ | |
| -destination 'platform=iOS Simulator,name=iPhone 16 Pro,OS=18.2' \ | |
| -only-testing:HackerNewsTests/SwiftSnapshotTest \ | |
| -allowProvisioningUpdates \ | |
| -authenticationKeyPath "$AUTH_KEY_PATH" \ | |
| -authenticationKeyID $APP_STORE_KEY_ID \ | |
| -authenticationKeyIssuerID $APP_STORE_ISSUER_ID \ | |
| ONLY_ACTIVE_ARCH=YES \ | |
| TARGETED_DEVICE_FAMILY=1 \ | |
| SUPPORTS_MACCATALYST=NO | xcpretty | |
| continue-on-error: true | |
| - name: Upload snapshots | |
| env: | |
| EMERGE_API_TOKEN: ${{ secrets.EMERGE_API_KEY }} | |
| run: | | |
| emerge upload snapshots \ | |
| --name "HackerNews Swift-Snapshot-Testing" \ | |
| --id "com.emerge.hn.Hacker-News.swiftsnapshottesting" \ | |
| --repo-name "EmergeTools/hackernews" \ | |
| --client-library swift-snapshot-testing \ | |
| --project-root . \ | |
| --debug |