Support old and new reputation type #1896
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: IOS CI | |
on: | |
push: | |
branches: [master, f-droid] | |
tags: | |
- "*" | |
pull_request: | |
branches: [master, f-droid] | |
env: | |
ARTIFACT_PATH: ./screenshots | |
# Cancel a currently running workflow from the same PR, branch or tag when a new workflow is | |
# triggered (ref https://stackoverflow.com/a/72408109) | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
cancel-in-progress: true | |
jobs: | |
ios_device_test: | |
runs-on: macos-13 | |
timeout-minutes: 60 | |
strategy: | |
matrix: | |
# See up to date screenshots specifications for Appstores: | |
# https://developer.apple.com/help/app-store-connect/reference/screenshot-specifications/ | |
include: | |
- device: "iPhone 14 Pro Max" | |
record_video: true | |
# With this flag we can run the CI against different node versions to check compatibility. | |
docker_tag: "1.5.4" | |
- device: "iPhone 8 Plus" | |
record_video: false | |
docker_tag: "1.5.4" | |
- device: "iPad Pro (12.9-inch) (6th generation)" | |
record_video: false | |
docker_tag: "1.5.4" | |
- device: "iPad Pro (12.9-inch) (2nd generation)" | |
record_video: false | |
docker_tag: "1.5.4" | |
fail-fast: false | |
steps: | |
# Setup Environment | |
- uses: actions/checkout@v4 | |
- name: prepare xcode | |
uses: maxim-lobanov/setup-xcode@v1 | |
with: | |
xcode-version: "14.3" | |
- name: "Prepare environment for ios" | |
working-directory: ./scripts | |
run: ./ios_init_env.sh | |
- uses: actions/setup-java@v4 | |
with: | |
java-version: "17" | |
distribution: "temurin" | |
- name: Install flutter wrapper | |
run: ./scripts/install_flutter_wrapper.sh | |
- name: "Create Simulator if iPad Pro 2nd gen" | |
if: ${{ matrix.device == 'iPad Pro (12.9-inch) (2nd generation)' }} | |
# Unfortunately it is not deterministic if the 16.2 or the 16.4 runtime is available | |
run: | | |
xcrun simctl create "iPad Pro (12.9-inch) (2nd generation)" "com.apple.CoreSimulator.SimDeviceType.iPad-Pro--12-9-inch---2nd-generation-" "com.apple.CoreSimulator.SimRuntime.iOS-16-4" || \ | |
xcrun simctl create "iPad Pro (12.9-inch) (2nd generation)" "com.apple.CoreSimulator.SimDeviceType.iPad-Pro--12-9-inch---2nd-generation-" "com.apple.CoreSimulator.SimRuntime.iOS-16-2" | |
- name: "Create Simulator if iPad 8 Plus" | |
if: ${{ matrix.device == 'iPhone 8 Plus' }} | |
# Unfortunately it is not deterministic if the 16.2 or the 16.4 runtime is available | |
run: | | |
xcrun simctl create "iPhone 8 Plus" "com.apple.CoreSimulator.SimDeviceType.iPhone-8-Plus" "com.apple.CoreSimulator.SimRuntime.iOS-16-4" || \ | |
xcrun simctl create "iPhone 8 Plus" "com.apple.CoreSimulator.SimDeviceType.iPhone-8-Plus" "com.apple.CoreSimulator.SimRuntime.iOS-16-2" | |
- name: Get dependencies (i.e., melos) | |
run: .flutter/bin/dart pub get | |
- name: Melos Bootstrap | |
run: .flutter/bin/dart run melos bootstrap | |
- name: Start colima a docker runtime for MacOs | |
# The brew install returns exit code 1 for a non-fatal dependency linker error. | |
# We don't care, the subsequent steps will work still. | |
run: | | |
brew install docker || true | |
brew install colima || true | |
colima start | |
- name: Run encointer-node | |
run: ./scripts/docker_run_encointer_node_notee.sh ${{ matrix.docker_tag }} & | |
- name: Bootstrap Demo Community | |
run: ./scripts/docker_run_encointer_client_bootstrap_demo_community.sh ${{ matrix.docker_tag }} | |
- name: "Start Simulator" | |
working-directory: ./scripts | |
env: | |
DEVICE_ID: ${{ matrix.device }} | |
run: source ./ios_emulator.sh | |
- name: Run integration tests with printscreens in all languages | |
if: startsWith(github.ref, 'refs/tags/') | |
run: ./scripts/multi_language_screenshot_ci_test.sh | |
env: | |
TEMP_DIR: ${{ env.ARTIFACT_PATH }} | |
RECORD: ${{ matrix.record_video }} | |
- name: Run integration tests with printscreens in en only | |
if: startsWith(github.ref , 'refs/tags/') != true | |
run: ./scripts/ios_integration_test.sh | |
env: | |
TEMP_DIR: ${{ env.ARTIFACT_PATH }} | |
RECORD: ${{ matrix.record_video }} | |
- name: "Upload screenshots and recording" | |
if: always() | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ matrix.device }} | |
path: ${{ env.ARTIFACT_PATH }} |