-
Notifications
You must be signed in to change notification settings - Fork 19
97 lines (95 loc) · 3.2 KB
/
ci.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
88
89
90
91
92
93
94
95
96
97
name: Continuous Integration
on:
push:
branches: [main]
pull_request:
jobs:
full-build:
runs-on: macos-12
steps:
- name: Checkout
uses: actions/[email protected]
- name: Full Build
run: ./fullbuild.sh
- name: Smoke Test
run: ./smoketest.sh
- name: Upload coverage to Codecov
uses: codecov/[email protected]
xcframework:
runs-on: macos-12
steps:
- name: Checkout
uses: actions/[email protected]
- name: Print Swift version
run: swift --version
- name: Build xcframework
working-directory: ./SplunkRumWorkspace/SplunkRum
run: ./build_binaries.sh
- name: Upload xcframework
uses: actions/[email protected]
with:
name: SplunkOtel.xcframework
path: ./SplunkRumWorkspace/SplunkRum/xcframeworks/SplunkOtel.xcframework
saucelabs-prepare:
runs-on: macOS-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.8'
- name: Build for Sauce Labs
run: |
BUILD_FOLDER="work/splunk-otel-ios/splunk-otel-ios/SauceLabsTests"
BUILD_PATH="Build/Products/Debug-iphonesimulator"
xcodebuild -showsdks
xcodebuild -workspace SplunkRumWorkspace/SplunkRumWorkspace.xcworkspace \
-scheme SauceLabsTestApp \
-configuration Debug \
-sdk iphonesimulator \
-derivedDataPath SauceLabsTests
zip ${GITHUB_WORKSPACE}/SauceLabsTestApp.zip $(find ~/$BUILD_FOLDER/$BUILD_PATH/SauceLabsTestApp.app -type f)
- name: Upload test app to Sauce Labs
id: sl-upload
run: |
cd /Users/runner/work/splunk-otel-ios/splunk-otel-ios/
item_id=$(curl -u "${{secrets.SAUCELABS_USER}}:${{secrets.SAUCELABS_KEY}}" --location \
--request POST 'https://api.us-west-1.saucelabs.com/v1/storage/upload' \
--form 'payload=@"SauceLabsTestApp.zip"' \
--form 'name="SauceLabsTestApp.zip"' \
--form 'description="'"$GITHUB_SHA"'"' | jq -r .item.id)
echo "sl_file_id=$item_id" >> $GITHUB_OUTPUT
outputs:
sl_file_id: ${{ steps.sl-upload.outputs.sl_file_id }}
saucelabs-tests:
runs-on: macOS-latest
needs: saucelabs-prepare
strategy:
fail-fast: false
matrix:
os: ['14', '15', '16']
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.8'
- name: Run Sauce Labs test cases
working-directory: SplunkRumWorkspace
env:
SAUCELABS_USER: ${{ secrets.SAUCELABS_USER }}
SAUCELABS_KEY: ${{ secrets.SAUCELABS_KEY }}
run: |
cd SauceLabsTestApp/
python3 -m pip install Appium-Python-Client
python3 sl_tests.py ${{ matrix.os }} ${{ needs.saucelabs-prepare.outputs.sl_file_id }}
check_links:
runs-on: ubuntu-22.04
steps:
- uses: actions/[email protected]
- name: Link Checker
uses: lycheeverse/[email protected]
with:
fail: true