Skip to content

Commit

Permalink
fix: download files in any case, correct handling of ignoreTestFailur…
Browse files Browse the repository at this point in the history
…es, ci (#21)
  • Loading branch information
matzuk authored Sep 5, 2024
1 parent c146c1d commit ee7374a
Show file tree
Hide file tree
Showing 5 changed files with 125 additions and 57 deletions.
123 changes: 123 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
name: "CI Workflow"

on:
workflow_dispatch:
pull_request:

jobs:
check_simple_android:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Run tests
uses: ./
with:
apiKey: ${{ secrets.MARATHON_CLOUD_API_TOKEN }}
application: "example/app.apk"
testApplication: "example/appTest.apk"
platform: android
name: "android_3_0"
version: "1.0.30"

check_output_android:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Run tests
uses: ./
with:
apiKey: ${{ secrets.MARATHON_CLOUD_API_TOKEN }}
application: "example/app.apk"
testApplication: "example/appTest.apk"
platform: android
name: "android_3_0"
output: "output"
version: "1.0.30"

- name: Check if output folder exists and is not empty
run: |
if [ -d "output" ] && [ "$(ls -A output)" ]; then
echo "Output folder exists and is not empty."
else
echo "Output folder does not exist or is empty."
exit 1
fi
- name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: output_android
path: output

check_failed_android:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Run tests
uses: ./
with:
apiKey: ${{ secrets.MARATHON_CLOUD_API_TOKEN }}
application: "example/app.apk"
testApplication: "example/appTestFailed.apk"
platform: android
name: "android_3_0"
output: "output"
version: "1.0.30"
ignoreTestFailures: "true"

- name: Check if output folder exists and is not empty
run: |
if [ -d "output" ] && [ "$(ls -A output)" ]; then
echo "Output folder exists and is not empty."
else
echo "Output folder does not exist or is empty."
exit 1
fi
- name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: output_android
path: output

check_ios:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Run tests parallel
uses: ./
with:
apiKey: ${{ secrets.MARATHON_CLOUD_API_TOKEN }}
application: "example/sample.zip"
testApplication: "example/sampleUITests-Runner.zip"
platform: ios
name: "ios_3_0"
output: "output"
version: "1.0.30"

- name: Check if output folder exists and is not empty
run: |
if [ -d "output" ] && [ "$(ls -A output)" ]; then
echo "Output folder exists and is not empty."
else
echo "Output folder does not exist or is empty."
exit 1
fi
- name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: output_ios
path: output
55 changes: 0 additions & 55 deletions .github/workflows/manual_trigger.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- name: Build app
run: ./gradlew assembleDebug assembleAndroidTest
- name: Run tests
uses: MarathonLabs/[email protected].10
uses: MarathonLabs/[email protected].11
with:
apiKey: ${{ secrets.MARATHON_CLOUD_API_TOKEN }}
application: app/build/outputs/apk/debug/app-debug.apk
Expand Down
2 changes: 1 addition & 1 deletion action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ runs:
with:
version: ${{ inputs.version }}
- name: Run tests using marathon-cloud
uses: MarathonLabs/[email protected].8
uses: MarathonLabs/[email protected].9
with:
apiKey: ${{ inputs.apiKey }}
application: ${{ inputs.application }}
Expand Down
Binary file added example/appTestFailed.apk
Binary file not shown.

0 comments on commit ee7374a

Please sign in to comment.