-
-
Notifications
You must be signed in to change notification settings - Fork 472
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into feature/macgills/detekt
# Conflicts: # .travis.yml
- Loading branch information
Showing
322 changed files
with
9,370 additions
and
2,924 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
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 |
---|---|---|
@@ -0,0 +1,41 @@ | ||
name: Coverage Reporting | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
- develop | ||
|
||
pull_request: | ||
branches: | ||
- '**' | ||
|
||
jobs: | ||
|
||
coverageReport: | ||
strategy: | ||
matrix: | ||
api-level: [21, 29] | ||
fail-fast: false | ||
runs-on: macOS-latest | ||
steps: | ||
- name: checkout | ||
uses: actions/checkout@v1 | ||
with: | ||
fetch-depth: 1 | ||
|
||
- name: create instrumentation coverage | ||
uses: reactivecircus/[email protected] | ||
with: | ||
api-level: ${{ matrix.api-level }} | ||
arch: x86_64 | ||
script: bash instrumentation.sh | ||
|
||
- name: create unit coverage | ||
run: ./gradlew jacocoTestDebugUnitTestReport jacocoTestCustomExampleDebugUnitTestReport | ||
|
||
- name: Upload coverage to Codecov | ||
uses: codecov/codecov-action@v1 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
fail_ci_if_error: true |
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 |
---|---|---|
@@ -0,0 +1,62 @@ | ||
name: Nightly | ||
|
||
on: | ||
schedule: | ||
# every night at midnight | ||
- cron: '0 0 * * *' | ||
|
||
jobs: | ||
|
||
instrumentation_tests: | ||
strategy: | ||
matrix: | ||
api-level: [21, 22, 23, 24, 25, 27, 28, 29] | ||
fail-fast: false | ||
runs-on: macOS-latest | ||
steps: | ||
|
||
- name: checkout | ||
uses: actions/checkout@v1 | ||
with: | ||
fetch-depth: 1 | ||
|
||
- name: run instrumentation tests | ||
uses: reactivecircus/[email protected] | ||
with: | ||
api-level: ${{ matrix.api-level }} | ||
arch: x86_64 | ||
script: ./gradlew connectedDebugAndroidTest | ||
|
||
unit_test_and_release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
- name: checkout | ||
uses: actions/checkout@v1 | ||
with: | ||
fetch-depth: 1 | ||
|
||
- name: run unit tests | ||
run: ./gradlew testDebugUnitTest testCustomExampleDebugUnitTest | ||
|
||
- name: build debug | ||
run: ./gradlew assembleDebug | ||
|
||
- name: Decrypt files | ||
env: | ||
ssh_key: ${{ secrets.ssh_key }} | ||
run: | | ||
echo "$ssh_key" | base64 -d > ssh_key | ||
chmod 600 ssh_key | ||
- name: Set date variable | ||
run: echo ::set-env name=DATE::$(echo $(date +%Y-%m-%d)) | ||
|
||
- name: release debug to kiwix.download.org | ||
env: | ||
UNIVERSAL_DEBUG_APK: app/build/outputs/apk/debug/*universal*.apk | ||
run: | | ||
mkdir $DATE | ||
cp $UNIVERSAL_DEBUG_APK $DATE | ||
scp -vrp -i ssh_key -o StrictHostKeyChecking=no $DATE [email protected]:/data/download/nightly/ | ||
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 |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: Pull requests | ||
|
||
on: [pull_request] | ||
|
||
jobs: | ||
|
||
staticAnalysis: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v1 | ||
with: | ||
fetch-depth: 1 | ||
|
||
- name: Static Analysis | ||
run: ./gradlew ktlintCheck detekt app:lintDebug core:lintDebug custom:lintCustomexampleDebug | ||
|
||
build: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v1 | ||
with: | ||
fetch-depth: 1 | ||
|
||
- name: Build all configurations | ||
run: ./gradlew assemble |
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 |
---|---|---|
@@ -0,0 +1,54 @@ | ||
name: Publish App | ||
|
||
on: | ||
push: | ||
branches-ignore: | ||
- '*' | ||
- '*/**' | ||
tags: | ||
- '*' | ||
- '*/**' | ||
|
||
jobs: | ||
publish: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v1 | ||
|
||
- name: Decrypt files | ||
env: | ||
keystore: ${{ secrets.keystore }} | ||
google_json: ${{ secrets.google_json }} | ||
ssh_key: ${{ secrets.ssh_key }} | ||
run: | | ||
echo "$google_json" | base64 -d > google.json | ||
echo "$keystore" | base64 -d > kiwix-android.keystore | ||
echo "$ssh_key" | base64 -d > ssh_key | ||
chmod 600 ssh_key | ||
- name: Set tag variable | ||
run: echo ::set-env name=TAG::$(echo ${GITHUB_REF:10}) | ||
|
||
- name: Publish app to play store | ||
env: | ||
KEY_ALIAS: ${{ secrets.KEY_ALIAS }} | ||
KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }} | ||
KEY_STORE_PASSWORD: ${{ secrets.KEY_STORE_PASSWORD }} | ||
run: ./gradlew publishReleaseApk | ||
|
||
- name: Publish app to download.kiwix.org | ||
env: | ||
UNIVERSAL_RELEASE_APK: app/build/outputs/apk/release/*universal*.apk | ||
run: | | ||
cp $UNIVERSAL_RELEASE_APK kiwix-${TAG}.apk | ||
scp -vrp -i ssh_key -o StrictHostKeyChecking=no kiwix-${TAG}.apk [email protected]:/data/download/release/kiwix-android/ | ||
- name: Publish to github releases | ||
uses: ncipollo/release-action@v1 | ||
with: | ||
artifacts: "app/build/outputs/apk/release/**" | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
draft: true | ||
prerelease: true |
This file was deleted.
Oops, something went wrong.
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
Oops, something went wrong.