From 947f9d9ab335251b47cdfe67c005251ab8e8f250 Mon Sep 17 00:00:00 2001 From: Alex Guretzki Date: Fri, 22 Mar 2024 09:47:52 +0100 Subject: [PATCH] More testing --- .github/workflows/regenerate-snapshots.yml | 82 ++++------------------ 1 file changed, 14 insertions(+), 68 deletions(-) diff --git a/.github/workflows/regenerate-snapshots.yml b/.github/workflows/regenerate-snapshots.yml index dc2d772a3c..6d051fac5e 100644 --- a/.github/workflows/regenerate-snapshots.yml +++ b/.github/workflows/regenerate-snapshots.yml @@ -4,89 +4,35 @@ on: push: # Remove the push part again branches: - '**' -jobs: - generate_snapshots: - runs-on: ${{ matrix.os }} - continue-on-error: true - strategy: - fail-fast: false - matrix: - include: - - version: '17.2' - runtime: 'iOS-17-2' - device: 'iPhone 14 Pro' - os: 'macos-13-xlarge' - xcode_version: '15.1' - - - version: '16.4' - runtime: 'iOS-16-4' - device: 'iPhone 14' - displayname: 'iPhone-14' - os: 'macos-13-xl' - xcode_version: '14.3' - - - version: '15.0' - runtime: 'iOS-15-0' - device: 'iPhone 13' - displayname: 'iPhone-13' - os: 'macos-12-xl' - xcode_version: '13.1' - - - version: '14.2' - device: 'iPhone 12' - displayname: 'iPhone-12' - runtime: 'iOS-14-2' - os: 'macos-12-xl' - xcode_version: '13.1' - - version: '13.7' - runtime: 'iOS-13-7' - device: 'iPhone 11' - displayname: 'iPhone-11' - os: 'macos-12-xl' - xcode_version: '13.1' +# TODO: Add a way to specify which device/os the snapshots should target + +jobs: + Generate: + runs-on: macos-13-xlarge steps: - uses: actions/checkout@v4 - uses: n1hility/cancel-previous-runs@v3 with: token: ${{ secrets.GITHUB_TOKEN }} - + + - name: Select latest Xcode + uses: maxim-lobanov/setup-xcode@v1 + with: + xcode-version: '15.1' + - name: Clear existing Snapshots run: | find ./UITests -name "__Snapshots__" -exec rm -rf {} + - - - name: Select Xcode ${{ matrix.xcode_version }} - run: | - ls /Applications/Xcode_*.app - sudo xcode-select -s /Applications/Xcode_${xcode_version}.app/Contents/Developer - env: - xcode_version: ${{ matrix.xcode_version }} - - - name: Download simulator if needed (${{ matrix.version }}) - run: | - xcversion simulators --install="iOS ${version}" - env: - version: ${{ matrix.version }} - - - name: Create simulator ${{ matrix.version }} - run: | - xcrun simctl list devices ${version} - xcrun simctl create ${displayname} "${device}" "com.apple.CoreSimulator.SimRuntime.${runtime}" - env: - version: ${{ matrix.version }} - displayname: ${{ matrix.displayname }} - device: ${{ matrix.device }} - runtime: ${{ matrix.runtime }} - - - name: Generate Snapshots ${{ matrix.version }} + - name: Generate Snapshots run: | - xcodebuild test -project "${project}" -scheme "${scheme}" ${params} -destination "${destination}" | xcpretty --utf --color + xcodebuild test -project "${project}" -scheme "${scheme}" ${params} -destination "name=iPhone 15 Pro,OS=17.2" | xcpretty --utf --color +# xcodebuild test -project "${project}" -scheme "${scheme}" ${params} -destination "name=iPad Pro (12.9-inch) (6th generation),OS=17.2" | xcpretty --utf --color env: project: 'Adyen.xcodeproj' params: '-skipPackagePluginValidation' scheme: 'GenerateSnapshots' - destination: "OS=${{ matrix.version }},name=${{ matrix.displayname }}" - name: Create Pull Request uses: peter-evans/create-pull-request@v6