Skip to content

Commit

Permalink
update test workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
xavjones8 committed Sep 12, 2024
1 parent b399d37 commit 925d58c
Showing 1 changed file with 15 additions and 7 deletions.
22 changes: 15 additions & 7 deletions .github/workflows/android-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ jobs:
- name: Set up Android SDK
uses: android-actions/setup-android@v2
with:
api-level: 34 # Set the API level you need
build-tools: '34.0.0' # Set the version of the build tools
api-level: 34
build-tools: '34.0.0'
target: 'android-34'

# Step 4: Cache Gradle dependencies
Expand All @@ -44,22 +44,30 @@ jobs:
restore-keys: |
${{ runner.os }}-gradle-
# Step 5: Build the app
# Step 5: Grant execute permission for gradlew
- name: Grant execute permission for gradlew
run: chmod +x ./gradlew
working-directory: GPAi

# Step 6: Build the app
- name: Build with Gradle
run: ./gradlew build
working-directory: GPAi

# Step 6: Run Unit Tests
# Step 7: Run Unit Tests
- name: Run Unit Tests
run: ./gradlew test
working-directory: GPAi

# Step 7: Run UI Tests (Instrumented tests)
# Step 8: Run UI Tests (Instrumented tests)
- name: Run Instrumented UI Tests
run: ./gradlew connectedAndroidTest
working-directory: GPAi

# Step 8: Archive test reports (Optional)
# Step 9: Archive test reports (Optional)
- name: Upload Test Results
if: always()
uses: actions/upload-artifact@v3
with:
name: test-results
path: app/build/reports/tests/
path: GPAi/app/build/reports/tests/

0 comments on commit 925d58c

Please sign in to comment.