This repository has been archived by the owner on May 6, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 189
87 lines (84 loc) · 2.93 KB
/
edXTestSuit.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
name: "edX Test Suit"
on:
pull_request:
push:
branches:
- master
jobs:
xcode-14:
name: "${{ matrix.env.name }}"
runs-on: macos-13
strategy:
fail-fast: false
matrix:
env:
- name: "Test iOS 16"
runtime: "iOS-16-4"
device: "iPhone 14 Pro"
task: "testLTRCurrentOS"
- name: "Test RTL iOS 16"
runtime: "iOS-16-4"
device: "iPhone 14 Pro"
task: "testRTLCurrentOS"
steps:
- name: "Select Xcode 14.3.1"
run: |
sudo xcode-select -s /Applications/Xcode_14.3.1.app
- name: Git checkout
uses: actions/checkout@v2
- name: Run tests
if: always()
run: |
TASK="${{ matrix.env.task }}"
RUNTIME="${{ matrix.env.runtime }}"
DEVICE="${{ matrix.env.device }}"
DEVICE_ID=com.apple.CoreSimulator.SimDeviceType.$(echo $DEVICE | sed -E -e "s/[ \\-]+/ /g" -e "s/[^[:alnum:]]/-/g")
RUNTIME_ID=com.apple.CoreSimulator.SimRuntime.$(echo $RUNTIME | sed -E -e "s/[ \\-]+/ /g" -e "s/[^[:alnum:]]/-/g")
DESTINATION_ID=$(xcrun simctl create "$DEVICE, $RUNTIME" $DEVICE_ID $RUNTIME_ID)
xcrun simctl boot $DESTINATION_ID
./gradlew -q $TASK | xcpretty -c
shell: bash
xcode-13:
name: "${{ matrix.env.name }}"
runs-on: macos-12
strategy:
fail-fast: false
matrix:
env:
- name: "Test iOS 15"
runtime: "iOS-15-5"
device: "iPhone 13 Pro"
task: "testLTRCurrentOS"
- name: "Test RTL iOS 15"
runtime: "iOS-15-5"
device: "iPhone 13 Pro"
task: "testRTLCurrentOS"
steps:
- name: "Select Xcode 13.4.1"
run: |
sudo xcode-select -s /Applications/Xcode_13.4.1.app
xcrun simctl list runtimes
- name: Git checkout
uses: actions/checkout@v2
- name: Calculate DESTINATION_ID
id: destination-id
run: |
TASK="${{ matrix.env.task }}"
RUNTIME="${{ matrix.env.runtime }}"
DEVICE="${{ matrix.env.device }}"
DEVICE_ID=com.apple.CoreSimulator.SimDeviceType.$(echo $DEVICE | sed -E -e "s/[ \\-]+/ /g" -e "s/[^[:alnum:]]/-/g")
RUNTIME_ID=com.apple.CoreSimulator.SimRuntime.$(echo $RUNTIME | sed -E -e "s/[ \\-]+/ /g" -e "s/[^[:alnum:]]/-/g")
DESTINATION_ID=$(xcrun simctl create "$DEVICE, $RUNTIME" $DEVICE_ID $RUNTIME_ID)
echo DESTINATION_ID
echo "DESTINATION_ID=${DESTINATION_ID}" >> $GITHUB_ENV
- name: Display DESTINATION_ID
run: |
echo "DESTINATION_ID: $DESTINATION_ID"
- name: Boot simulator
run: |
xcrun simctl boot $DESTINATION_ID
- name: Run tests
if: always()
run: |
./gradlew -q $TASK | xcpretty -c
shell: bash