Skip to content
This repository has been archived by the owner on Jan 10, 2025. It is now read-only.

Commit

Permalink
Eliminate Docker dependency for running unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
valldrac committed Mar 22, 2023
1 parent 62080cf commit 776c42b
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 20 deletions.
1 change: 0 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,3 @@
**/test/androidTestEspresso/res/values/arrays.xml
reproducible-builds/certs
reproducible-builds/outputs
reproducible-builds/test-reports
17 changes: 11 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ on:
- '.github/FUNDING.yml'
- '.github/ISSUE_TEMPLATE/**'

permissions:
contents: read # to fetch code (actions/checkout)

jobs:
wrapper_validation:
name: Validate Gradle wrapper
Expand All @@ -36,17 +39,19 @@ jobs:
sudo swapon /swapB
swapon --show
- name: Set up builder image
run: docker-compose build
working-directory: reproducible-builds
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 11
cache: gradle

- name: Run tests
run: docker-compose run test
working-directory: reproducible-builds
run: ./gradlew build --no-daemon

- name: Archive reports for failed tests
if: "failure()"
uses: actions/upload-artifact@v3
with:
name: test-reports
path: "reproducible-builds/test-reports"
path: '*/build/reports'
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,3 @@ signing.properties
test/androidTestEspresso/res/values/arrays.xml
/reproducible-builds/certs
/reproducible-builds/outputs
/reproducible-builds/test-reports
13 changes: 1 addition & 12 deletions reproducible-builds/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ services:
image: reproducible-molly
build:
context: ..
command: :app:assembleRelease :app:bundleRelease
command: :app:assembleRelease :app:bundleRelease --no-daemon
volumes:
- ./certs:/molly/app/certs:ro
- ./outputs:/molly/app/build/outputs
Expand All @@ -18,14 +18,3 @@ services:
- CI_KEYSTORE_PATH
- CI_KEYSTORE_PASSWORD
- CI_KEYSTORE_ALIAS
test:
image: reproducible-molly
build:
context: ..
command: build
volumes:
- ./test-reports:/molly/app/build/reports
environment:
- BUILD_SCAN=1
profiles:
- test
Empty file.

0 comments on commit 776c42b

Please sign in to comment.