Skip to content

Commit

Permalink
Add pull request testing workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
ianrumac committed Jul 11, 2024
1 parent 5c2135a commit 5bf0451
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/on-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Pull Request Workflow

on:
pull_request:
branches: [ "develop" ] # Trigger on PRs to main branch
types: [opened, synchronize, reopened] # Trigger on PR events

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set Up JDK
uses: actions/setup-java@v3
with:
distribution: 'zulu' # See 'Supported distributions' for available options
java-version: '17'
cache: 'gradle'

# Allow us to run the command
- name: Change wrapper permissions
run: chmod +x ./gradlew

# Run Build & Test the Project
- name: Build gradle project
run: ./gradlew build

- name: Build test project
run: ./gradlew :app:assembleAndroidTest -DtestBuildType=debug

- name: Run tests on Firebase Test Lab
uses: asadmansr/[email protected]
with:
arg-spec: '.github/firebase-tests.yml:android-pixel-7'
env:
SERVICE_ACCOUNT: ${{ secrets.SERVICE_ACCOUNT }}

0 comments on commit 5bf0451

Please sign in to comment.