Releases/v1.1.0 (#52) #198
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: Test with Sauce Labs | |
on: | |
push: | |
env: | |
SAUCE_USERNAME: ${{secrets.SAUCE_USERNAME}} | |
SAUCE_ACCESS_KEY: ${{secrets.SAUCE_ACCESS_KEY}} | |
#concurrency: | |
# group: sauce-labs | |
# cancel-in-progress: true | |
jobs: | |
build: | |
name: Build Test APKs | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
- name: Build automated tests | |
uses: gradle/[email protected] | |
with: | |
arguments: automatedtests:assembleDebug :automatedtests:assembleDebugAndroidTest | |
- name: Upload Test APKs | |
uses: actions/upload-artifact@v3 | |
with: | |
name: automated-test-apks | |
path: | | |
automatedtests/build/outputs/apk/androidTest/debug/automatedtests-debug-androidTest.apk | |
automatedtests/build/outputs/apk/debug/automatedtests-debug.apk | |
test: | |
name: Run Sauce Labs Tests | |
runs-on: ubuntu-latest | |
needs: build | |
env: | |
app_artifact: automatedtests\/build\/outputs\/apk\/debug\/automatedtests-debug.apk | |
test_artifact: automatedtests\/build\/outputs\/apk\/androidTest\/debug\/automatedtests-debug-androidTest.apk | |
app_apk: debug\/automatedtests-debug.apk | |
test_apk: androidTest\/debug\/automatedtests-debug-androidTest.apk | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Download Test APKS | |
uses: actions/download-artifact@v3 | |
with: | |
name: automated-test-apks | |
- name: Build sauce config file | |
run: | | |
sed -E \ | |
-e 's/BUILD_LABEL/debug/g' \ | |
-e 's/APP_APK/${{ env.app_apk }}/g' \ | |
-e 's/TEST_APK/${{ env.test_apk }}/g' \ | |
.sauce/template.yml > .sauce/conf.yml | |
- name: Dump Generated Sauce Conf | |
run: cat .sauce/conf.yml | |
- name: Run Saucelabs Test | |
uses: saucelabs/saucectl-run-action@v3 | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
with: | |
sauce-username: ${{ secrets.SAUCE_USERNAME }} | |
sauce-access-key: ${{ secrets.SAUCE_ACCESS_KEY }} | |
config-file: .sauce/conf.yml |