Skip to content

Commit

Permalink
Run screenshots action on Github
Browse files Browse the repository at this point in the history
  • Loading branch information
Jon Petersson committed Dec 6, 2023
1 parent df3262c commit 1758ef5
Show file tree
Hide file tree
Showing 2 changed files with 78 additions and 0 deletions.
67 changes: 67 additions & 0 deletions .github/workflows/ios-screenshots.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# ---
# name: iOS screenshots
# on:
# pull_request:
# paths:
# - .github/workflows/ios-screenshots.yml
# - ios/**/*.swift
# - ios/**/*.xctestplan

# jobs:
# test:
# name: Screenshots
# runs-on: macos-13-xlarge
# env:
# SOURCE_PACKAGES_PATH: .spm
# steps:
# - name: Checkout repository
# uses: actions/checkout@v3

# - name: Configure cache
# uses: actions/cache@v3
# with:
# path: ios/${{ env.SOURCE_PACKAGES_PATH }}
# key: ${{ runner.os }}-spm-${{ hashFiles('ios/**/Package.resolved') }}
# restore-keys: |
# ${{ runner.os }}-spm-

# - name: Setup go-lang
# uses: actions/setup-go@v3
# with:
# go-version: 1.19.5

# - name: Set up yeetd to workaround XCode being slow in CI
# run: |
# wget https://github.com/biscuitehh/yeetd/releases/download/1.0/yeetd-normal.pkg
# sudo installer -pkg yeetd-normal.pkg -target /
# yeetd &
# - name: Configure Xcode
# uses: maxim-lobanov/setup-xcode@v1
# with:
# xcode-version: '15.0.1'
# - name: Configure Rust
# run: rustup target add aarch64-apple-ios-sim

# - name: Configure Xcode project
# run: |
# cp Base.xcconfig.template Base.xcconfig
# cp App.xcconfig.template App.xcconfig
# cp PacketTunnel.xcconfig.template PacketTunnel.xcconfig
# cp Screenshots.xcconfig.template Screenshots.xcconfig
# working-directory: ios/Configurations

# - name: Install xcbeautify
# run: |
# brew update
# brew install xcbeautify

# - name: Run tests
# run: |
# set -o pipefail && env NSUnbufferedIO=YES xcodebuild \
# -project MullvadVPN.xcodeproj \
# -scheme MullvadVPN \
# -testPlan MullvadVPNScreenshots \
# -destination "platform=iOS Simulator,name=iPhone 15" \
# -clonedSourcePackagesDirPath "$SOURCE_PACKAGES_PATH" \
# test 2>&1 | xcbeautify
# working-directory: ios/
11 changes: 11 additions & 0 deletions .github/workflows/ios.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,3 +98,14 @@ jobs:
-clonedSourcePackagesDirPath "$SOURCE_PACKAGES_PATH" \
test 2>&1 | xcbeautify
working-directory: ios/

- name: Run screenshots
run: |
set -o pipefail && env NSUnbufferedIO=YES xcodebuild \
-project MullvadVPN.xcodeproj \
-scheme MullvadVPN \
-testPlan MullvadVPNScreenshots \
-destination "platform=iOS Simulator,name=iPhone 15" \
-clonedSourcePackagesDirPath "$SOURCE_PACKAGES_PATH" \
test 2>&1 | xcbeautify
working-directory: ios/

0 comments on commit 1758ef5

Please sign in to comment.