mirror of
https://github.com/mollyim/mollyim-insider-android.git
synced 2025-05-13 05:40:53 +01:00
Eliminate Docker dependency for running unit tests
This commit is contained in:
parent
62080cfe92
commit
776c42b614
5 changed files with 12 additions and 20 deletions
|
@ -11,4 +11,3 @@
|
||||||
**/test/androidTestEspresso/res/values/arrays.xml
|
**/test/androidTestEspresso/res/values/arrays.xml
|
||||||
reproducible-builds/certs
|
reproducible-builds/certs
|
||||||
reproducible-builds/outputs
|
reproducible-builds/outputs
|
||||||
reproducible-builds/test-reports
|
|
||||||
|
|
17
.github/workflows/test.yml
vendored
17
.github/workflows/test.yml
vendored
|
@ -10,6 +10,9 @@ on:
|
||||||
- '.github/FUNDING.yml'
|
- '.github/FUNDING.yml'
|
||||||
- '.github/ISSUE_TEMPLATE/**'
|
- '.github/ISSUE_TEMPLATE/**'
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read # to fetch code (actions/checkout)
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
wrapper_validation:
|
wrapper_validation:
|
||||||
name: Validate Gradle wrapper
|
name: Validate Gradle wrapper
|
||||||
|
@ -36,17 +39,19 @@ jobs:
|
||||||
sudo swapon /swapB
|
sudo swapon /swapB
|
||||||
swapon --show
|
swapon --show
|
||||||
|
|
||||||
- name: Set up builder image
|
- name: Set up JDK 11
|
||||||
run: docker-compose build
|
uses: actions/setup-java@v3
|
||||||
working-directory: reproducible-builds
|
with:
|
||||||
|
distribution: temurin
|
||||||
|
java-version: 11
|
||||||
|
cache: gradle
|
||||||
|
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
run: docker-compose run test
|
run: ./gradlew build --no-daemon
|
||||||
working-directory: reproducible-builds
|
|
||||||
|
|
||||||
- name: Archive reports for failed tests
|
- name: Archive reports for failed tests
|
||||||
if: "failure()"
|
if: "failure()"
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: test-reports
|
name: test-reports
|
||||||
path: "reproducible-builds/test-reports"
|
path: '*/build/reports'
|
||||||
|
|
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -11,4 +11,3 @@ signing.properties
|
||||||
test/androidTestEspresso/res/values/arrays.xml
|
test/androidTestEspresso/res/values/arrays.xml
|
||||||
/reproducible-builds/certs
|
/reproducible-builds/certs
|
||||||
/reproducible-builds/outputs
|
/reproducible-builds/outputs
|
||||||
/reproducible-builds/test-reports
|
|
||||||
|
|
|
@ -4,7 +4,7 @@ services:
|
||||||
image: reproducible-molly
|
image: reproducible-molly
|
||||||
build:
|
build:
|
||||||
context: ..
|
context: ..
|
||||||
command: :app:assembleRelease :app:bundleRelease
|
command: :app:assembleRelease :app:bundleRelease --no-daemon
|
||||||
volumes:
|
volumes:
|
||||||
- ./certs:/molly/app/certs:ro
|
- ./certs:/molly/app/certs:ro
|
||||||
- ./outputs:/molly/app/build/outputs
|
- ./outputs:/molly/app/build/outputs
|
||||||
|
@ -18,14 +18,3 @@ services:
|
||||||
- CI_KEYSTORE_PATH
|
- CI_KEYSTORE_PATH
|
||||||
- CI_KEYSTORE_PASSWORD
|
- CI_KEYSTORE_PASSWORD
|
||||||
- CI_KEYSTORE_ALIAS
|
- CI_KEYSTORE_ALIAS
|
||||||
test:
|
|
||||||
image: reproducible-molly
|
|
||||||
build:
|
|
||||||
context: ..
|
|
||||||
command: build
|
|
||||||
volumes:
|
|
||||||
- ./test-reports:/molly/app/build/reports
|
|
||||||
environment:
|
|
||||||
- BUILD_SCAN=1
|
|
||||||
profiles:
|
|
||||||
- test
|
|
||||||
|
|
Loading…
Reference in a new issue