-
-
Notifications
You must be signed in to change notification settings - Fork 157
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2238 from CatimaLoyalty/feature/flavours
Start using flavours
- Loading branch information
Showing
7 changed files
with
93 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,39 +30,45 @@ jobs: | |
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
api-level: [ 21, 34 ] | ||
flavor: [Foss, Gplay] | ||
steps: | ||
- uses: actions/[email protected] | ||
- name: Fail on bad translations | ||
run: if grep -ri "<xliff" app/src/main/res/values*/strings.xml; then echo "Invalidly escaped translations found"; exit 1; fi | ||
- uses: gradle/actions/wrapper-validation@v4 | ||
- name: set up OpenJDK 17 | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y openjdk-17-jdk-headless | ||
sudo update-alternatives --auto java | ||
- name: Build | ||
run: ./gradlew assembleRelease | ||
- name: Check lint | ||
run: ./gradlew lintRelease | ||
- name: Run unit tests | ||
run: timeout 5m ./gradlew testReleaseUnitTest || { ./gradlew --stop && timeout 5m ./gradlew testReleaseUnitTest; } | ||
- name: Enable KVM | ||
run: | | ||
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules | ||
sudo udevadm control --reload-rules | ||
sudo udevadm trigger --name-match=kvm | ||
- name: Run instrumented tests | ||
uses: ReactiveCircus/android-emulator-runner@v2 | ||
with: | ||
api-level: ${{ matrix.api-level }} | ||
arch: x86_64 | ||
script: ./gradlew connectedCheck | ||
- name: SpotBugs | ||
run: ./gradlew spotbugsRelease | ||
- name: Archive test results | ||
if: always() | ||
uses: actions/[email protected] | ||
with: | ||
name: test-results-api${{ matrix.api-level }} | ||
path: app/build/reports | ||
- uses: actions/[email protected] | ||
- name: Fail on bad translations | ||
run: if grep -ri "<xliff" app/src/main/res/values*/strings.xml; then echo "Invalidly escaped translations found"; exit 1; fi | ||
- uses: gradle/actions/wrapper-validation@v4 | ||
- name: set up OpenJDK 17 | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y openjdk-17-jdk-headless | ||
sudo update-alternatives --auto java | ||
- name: Build | ||
run: ./gradlew assemble${{ matrix.flavor }}Release | ||
- name: Check lint | ||
run: ./gradlew lint${{ matrix.flavor }}Release | ||
- name: Run unit tests | ||
run: timeout 5m ./gradlew test${{ matrix.flavor }}ReleaseUnitTest || { ./gradlew --stop && timeout 5m ./gradlew test${{ matrix.flavor }}ReleaseUnitTest; } | ||
- name: Enable KVM | ||
run: | | ||
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules | ||
sudo udevadm control --reload-rules | ||
sudo udevadm trigger --name-match=kvm | ||
- name: Run instrumented tests (API 21) | ||
uses: ReactiveCircus/android-emulator-runner@v2 | ||
with: | ||
api-level: 21 | ||
arch: x86_64 | ||
script: ./gradlew connected${{ matrix.flavor }}DebugAndroidTest | ||
- name: Run instrumented tests (API 34) | ||
uses: ReactiveCircus/android-emulator-runner@v2 | ||
with: | ||
api-level: 34 | ||
arch: x86_64 | ||
script: ./gradlew connected${{ matrix.flavor }}DebugAndroidTest | ||
- name: SpotBugs | ||
run: ./gradlew spotbugs${{ matrix.flavor }}Release | ||
- name: Archive test results | ||
if: always() | ||
uses: actions/[email protected] | ||
with: | ||
name: test-results-flavor${{ matrix.flavor }} | ||
path: app/build/reports |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,3 +25,6 @@ | |
/.bundle/ | ||
/vendor/bundle | ||
/lib/bundler/man/ | ||
|
||
# Catima-specific | ||
SHA256SUMS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters