update ci #498
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: BrowserStack CI | ||
on: | ||
push: | ||
branches: [ atavism/google-pay-test-purchase ] | ||
pull_request: | ||
branches: [ main ] | ||
env: | ||
GOPRIVATE: github.com/getlantern | ||
jobs: | ||
build: | ||
Check failure on line 12 in .github/workflows/browerstack.yml GitHub Actions / BrowserStack CIInvalid workflow file
|
||
runs-on: | ||
group: large-runners | ||
needs: [ set-version , build-android ] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
lfs: true | ||
- name: Pull LFS objects | ||
run: git lfs pull | ||
# Download APK and AAB artifacts | ||
- name: Download apk | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: android-apk-build | ||
- name: Download aab | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: android-aab-build | ||
- name: Install jq | ||
run: sudo apt-get install jq | ||
- name: Upload APK to BrowserStack | ||
env: | ||
BROWSERSTACK_USERNAME: ${{ secrets.BROWSERSTACK_USERNAME }} | ||
BROWSERSTACK_ACCESS_KEY: ${{ secrets.BROWSERSTACK_ACCESS_KEY }} | ||
BROWSERSTACK_APP_PATH: "lantern-installer.apk" | ||
run: | | ||
response=$(curl -u "$BROWSERSTACK_USERNAME:$BROWSERSTACK_ACCESS_KEY" \ | ||
-X POST "https://api-cloud.browserstack.com/app-automate/upload" \ | ||
-F "file=@$BROWSERSTACK_APP_PATH" \ | ||
-F "custom_id=LanternApp") | ||
app_url=$(echo $response | jq -r .app_url) | ||
echo "$app_url" | ||
echo "BROWSERSTACK_APP_ID=$app_url" >> $GITHUB_ENV | ||
- name: Upload AAB to BrowserStack | ||
env: | ||
BROWSERSTACK_USERNAME: ${{ secrets.BROWSERSTACK_USERNAME }} | ||
BROWSERSTACK_ACCESS_KEY: ${{ secrets.BROWSERSTACK_ACCESS_KEY }} | ||
BROWSERSTACK_APP_PATH: "lantern-installer.aab" | ||
run: | | ||
response=$(curl -u "$BROWSERSTACK_USERNAME:$BROWSERSTACK_ACCESS_KEY" \ | ||
-X POST "https://api-cloud.browserstack.com/app-automate/upload" \ | ||
-F "file=@$BROWSERSTACK_APP_PATH" \ | ||
-F "custom_id=LanternApp") | ||
app_url=$(echo $response | jq -r .app_url) | ||
echo "$app_url" | ||
echo "BROWSERSTACK_APP_ID=$app_url" >> $GITHUB_ENV | ||
- name: Run Tests | ||
env: | ||
BROWSERSTACK_USERNAME: ${{ secrets.BROWSERSTACK_USERNAME }} | ||
BROWSERSTACK_ACCESS_KEY: ${{ secrets.BROWSERSTACK_ACCESS_KEY }} | ||
RUN_ENV: "live" | ||
run: | | ||
cd appium_kotlin | ||
./gradlew test |