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

Test/analytics read only flag #27

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
168 changes: 85 additions & 83 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,89 +21,90 @@ jobs:
platform: android
name: "android_3_0"
version: "1.0.38"

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.38"
resultFile: "some-result.json"
branch: "develop"

- 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: Check if resultFile exists
run: |
if [ ! -f "some-result.json" ]; then
echo "Error: some-result.json does not exist."
exit 1
fi

- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: output_android
path: output

- name: Upload resultFile
if: always()
uses: actions/upload-artifact@v4
with:
name: some-result.json
path: some-result.json

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.38"
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@v4
with:
name: output_android_failed
path: output
analyticsReadOnly: "true"

# 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.38"
# resultFile: "some-result.json"
# branch: "develop"

# - 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: Check if resultFile exists
# run: |
# if [ ! -f "some-result.json" ]; then
# echo "Error: some-result.json does not exist."
# exit 1
# fi

# - name: Upload artifact
# uses: actions/upload-artifact@v4
# with:
# name: output_android
# path: output

# - name: Upload resultFile
# if: always()
# uses: actions/upload-artifact@v4
# with:
# name: some-result.json
# path: some-result.json

# 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.38"
# 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@v4
# with:
# name: output_android_failed
# path: output

check_ios:
runs-on: ubuntu-latest
Expand All @@ -122,6 +123,7 @@ jobs:
name: "ios_3_0"
output: "output"
version: "1.0.38"
analyticsReadOnly: "true"

- name: Check if output folder exists and is not empty
run: |
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ jobs:
| `branch` (optional) | Branch for run, for example it could be git branch like develop or feature/about-screen | `` | `develop` |
| `project` (optional) | The unique identifier (slug) for the project | `` | `` |
| `grantedPermission` (optional) | Grant permission to application. Important: Granting is conducted before each test batch (not each test). If you need to grant before each test, please use --isolated mode. Available permissions: calendar, contacts-limited, contacts, location, location-always, photos-add, photos, media-library, microphone, motion, reminders, siri | `` | `motion,siri,calendar` |
| `analyticsReadOnly` (optional) | If true then test run will not affect any statistical measurements | `false` | `true`, `false` |

## marathon-cloud version

Expand Down
6 changes: 5 additions & 1 deletion action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,9 @@ inputs:
grantedPermission:
description: "Grant permission to application. Important: Granting is conducted before each test batch (not each test). If you need to grant before each test, please use --isolated mode. Available permissions: calendar, contacts-limited, contacts, location, location-always, photos-add, photos, media-library, microphone, motion, reminders, siri. Format: 'motion,siri'"
required: false
analyticsReadOnly:
description: "If true then test run will not affect any statistical measurements [possible values: true, false]"
required: false
branding:
color: purple
icon: play-circle
Expand All @@ -93,7 +96,7 @@ runs:
with:
version: ${{ inputs.version }}
- name: Run tests using marathon-cloud
uses: MarathonLabs/[email protected].12
uses: MarathonLabs/[email protected].13
with:
apiKey: ${{ inputs.apiKey }}
application: ${{ inputs.application }}
Expand Down Expand Up @@ -121,3 +124,4 @@ runs:
branch: ${{ inputs.branch }}
project: ${{ inputs.project }}
grantedPermission: ${{ inputs.grantedPermission }}
analyticsReadOnly: ${{ inputs.analyticsReadOnly }}
Loading