Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add SauceLabs tests to CI #137

Merged
merged 57 commits into from
Nov 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
49d2982
feat: add ci script
seemk Apr 16, 2023
b12c529
ci indent
seemk Apr 16, 2023
8e66258
sha
seemk Apr 16, 2023
493e09b
pathing
seemk Apr 16, 2023
6c23e49
ios version fix
seemk Apr 16, 2023
f569ce0
remove useless ls
seemk Apr 16, 2023
0d952ed
pathing
seemk Apr 16, 2023
8bf1355
add test script
seemk Apr 24, 2023
43a50b9
pass sl creds to tests
seemk Apr 24, 2023
431656c
generic build
seemk Apr 24, 2023
d7ba80a
remove device from destination
seemk Apr 24, 2023
2eba5bb
simulator sdk
seemk Apr 24, 2023
d87b4cb
show sdks
seemk Apr 24, 2023
981f502
try any iphone device
seemk Apr 24, 2023
6dcdd00
use file ids
seemk Apr 24, 2023
28f1d8b
debug
seemk Apr 24, 2023
d4538c2
debug
seemk Apr 24, 2023
782ae6d
debug
seemk Apr 24, 2023
7495602
better steps variables
seemk Apr 24, 2023
473517e
reduce the amount of tests
seemk Apr 24, 2023
d271dcd
add automation name
seemk Apr 24, 2023
750ebc6
webdriver test
seemk Apr 26, 2023
067dc90
try accessibility identifiers
seemk Apr 26, 2023
154111e
attempt finding by name
seemk Apr 26, 2023
e2772b3
print page source
seemk Apr 26, 2023
19615f0
network tests
seemk May 1, 2023
81634b1
better test runner
seemk May 25, 2023
d923f7f
more tests
seemk May 29, 2023
0313735
update sl script
seemk May 29, 2023
0f7d7fa
lint
seemk May 29, 2023
7e675c8
add more ios versions
seemk May 29, 2023
faabbc6
remove unused code
seemk May 29, 2023
d738a0a
relax ios versions
seemk May 29, 2023
9cc8ecf
update sl options
seemk May 29, 2023
cb0021a
only upload to sl once
seemk May 29, 2023
718c983
check out code
seemk May 29, 2023
d95a21b
add minimum deployment target for test app
seemk May 29, 2023
ff3314d
dont specify sdk version
seemk May 29, 2023
550a06d
change minimum deployment version
seemk May 29, 2023
263f055
ios compatibility fixes
seemk May 29, 2023
252fa1f
make the app work on ios 13
seemk May 30, 2023
b8cd19e
add ios 13 to ci
seemk May 30, 2023
8488751
try matching accessibility identifier
seemk May 30, 2023
8297338
try different accessibility identifier
seemk May 30, 2023
c152bb4
find element by accessibility id instead
seemk May 30, 2023
66b8015
find by ids, remove ios 13
seemk May 30, 2023
4b0fd62
add alamofire test
seemk May 30, 2023
4f9a210
use click not tap
seemk May 30, 2023
707444c
remove debug lines from ci
seemk May 30, 2023
a72bbd9
Merge branch 'main' into saucelabs-tests
seemk Nov 1, 2023
be8a923
Merge branch 'main' into saucelabs-tests
seemk Nov 13, 2023
c4bd3d4
use newer splunkrum api
seemk Nov 13, 2023
de3f533
name desired caps explicitly
seemk Nov 13, 2023
0be9d24
upgrade to selenium 4 options
seemk Nov 13, 2023
a7cc1b3
use safari options
seemk Nov 13, 2023
7118b53
use pinned appium client
seemk Nov 13, 2023
6594adc
use older appium api
seemk Nov 13, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 56 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,62 @@ jobs:
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']
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great. I really like that the test matrix is in github rather than in SauceLabs UI/config.

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==2.11.1
python3 sl_tests.py ${{ matrix.os }} ${{ needs.saucelabs-prepare.outputs.sl_file_id }}
check_links:
runs-on: ubuntu-22.04
steps:
Expand Down
Loading