-
Notifications
You must be signed in to change notification settings - Fork 89
89 lines (73 loc) · 2.46 KB
/
Copy pathtvos_pull_request.yml
File metadata and controls
89 lines (73 loc) · 2.46 KB
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
88
89
name: tvos_build_and_test
on:
pull_request:
workflow_dispatch:
concurrency:
group: "${{ github.workflow }}-${{ github.ref }}"
cancel-in-progress: true
jobs:
build:
runs-on: macos-26
env:
TEST_RUNNER_PIA_TEST_USER: ${{ secrets.PIA_ACCOUNT_USERNAME}}
TEST_RUNNER_PIA_TEST_PASSWORD: ${{ secrets.PIA_ACCOUNT_PASSWORD }}
TEST_RUNNER_PIA_TEST_DEDICATEDIP: ${{ secrets.PIA_TEST_DEDICATEDIP }}
steps:
- name: Setup Git credentials
run: |
git config --global url."https://${{ secrets.ORG_GITHUB_USERNAME }}:${{ secrets.ORG_GITHUB_TOKEN }}@github.com/".insteadOf "git@github.com:"
- uses: actions/checkout@v4
- name: Select Xcode version
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest-stable
- name: Download tvOS Platform
run: |
# Check if tvOS platform is already installed
if xcodebuild -showsdks | grep -q "appletvos"; then
echo "tvOS platform already installed, skipping download"
exit 0
fi
# Retry up to 3 times if download fails
max_attempts=3
attempt=1
while [ $attempt -le $max_attempts ]; do
echo "Attempt $attempt of $max_attempts: Downloading tvOS platform..."
if xcodebuild -downloadPlatform tvOS; then
echo "tvOS platform downloaded successfully"
exit 0
else
echo "Download failed on attempt $attempt"
if [ $attempt -lt $max_attempts ]; then
echo "Retrying in 10 seconds..."
sleep 10
fi
fi
attempt=$((attempt + 1))
done
echo "Failed to download tvOS platform after $max_attempts attempts"
exit 1
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.3.5
- name: Install Fastlane
run: gem install fastlane
- name: Run tvOS unit tests
run: bundle exec fastlane tvOStests
- name: Upload tvOS test results
if: failure()
uses: actions/upload-artifact@v4
with:
name: tvos-test-results
path: |
fastlane/test_output/
**/*.xcresult
build/reports/
retention-days: 30
if-no-files-found: warn
# - name: Run tvOS snapshot tests
# run: bundle exec fastlane tvos_snapshot_tests
# - name: Run tvOS e2e tests
# run: bundle exec fastlane tvos_e2e_tests
# timeout-minutes: 45