Skip to content

Commit ef5ba92

Browse files
committed
Add pull request testing workflow
1 parent 400acb0 commit ef5ba92

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed

.github/workflows/on-pr.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Pull Request Workflow
2+
3+
on:
4+
pull_request:
5+
branches: [ "develop" ] # Trigger on PRs to main branch
6+
types: [opened, synchronize, reopened] # Trigger on PR events
7+
8+
jobs:
9+
build:
10+
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- uses: actions/checkout@v3
15+
with:
16+
fetch-depth: 0
17+
- name: Set Up JDK
18+
uses: actions/setup-java@v3
19+
with:
20+
distribution: 'zulu' # See 'Supported distributions' for available options
21+
java-version: '17'
22+
cache: 'gradle'
23+
24+
# Allow us to run the command
25+
- name: Change wrapper permissions
26+
run: chmod +x ./gradlew
27+
28+
# Run Build & Test the Project
29+
- name: Build gradle project
30+
run: ./gradlew build
31+
32+
- name: Build test project
33+
run: ./gradlew :app:assembleAndroidTest -DtestBuildType=debug
34+
35+
- name: Run tests on Firebase Test Lab
36+
uses: asadmansr/[email protected]
37+
with:
38+
arg-spec: '.github/firebase-tests.yml:android-pixel-7'
39+
env:
40+
SERVICE_ACCOUNT: ${{ secrets.SERVICE_ACCOUNT }}
41+

0 commit comments

Comments
 (0)