mirror of
https://github.com/kiwix/kiwix-android.git
synced 2025-08-03 02:36:24 -04:00
71 lines
1.7 KiB
YAML
71 lines
1.7 KiB
YAML
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/android-emulator-runner@v2.8.0
|
|
with:
|
|
api-level: ${{ matrix.api-level }}
|
|
arch: x86_64
|
|
ndk: 21.1.6352462
|
|
script: bash contrib/instrumentation_nightly.sh
|
|
|
|
- name: Upload screenshot result
|
|
uses: actions/upload-artifact@v1
|
|
if: failure()
|
|
with:
|
|
name: ${{ matrix.api-level }}
|
|
path: screencap.png
|
|
|
|
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 ci@download.kiwix.org:/data/download/nightly/
|
|
|