Skip to content

Export tests results kiwi #147

Export tests results kiwi

Export tests results kiwi #147

Workflow file for this run

name: Build & Test Project
on:
push:
branches:
- main
pull_request:
branches:
- '**'
jobs:
build:
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
python-version: [ 3.8]
kiwitcms-url: [ vocable.wtadev.com ]
make-command: [ export-kiwi ]
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set Up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
cache: gradle
- name: Set up Python 3.8
uses: actions/setup-python@v1
with:
python-version: 3.8
- name: Install Python dependencies
run: |
pip install -U pip wheel
pip install -r devel.txt
- name: Run Unit Tests
run: ./gradlew testDebug
# - name: Run UI Tests
# run: ./gradlew connectedDebugAndroidTest
- name: Upload test results
if: always()
uses: actions/upload-artifact@v3
with:
name: test-results
path: app/build/reports/
- name: Nose coverage
run: nose2 -v --with-coverage --coverage tcms_junit_plugin
- name: Install kiwitcms plugin and create config
run: |
pip install git+https://github.com/kiwitcms/[email protected]
cat > ~/.tcms.conf << _EOF
[tcms]
url = https://vocable.wtadev.com/xml-rpc/
username = kiwi_bot
password = UgAco3GdHhLEyU7zZNZ8
_EOF
shell: bash
- name: Run kiwitcms export
run: tcms-junit.xml-plugin $([ "false" == "true" ] && echo "-v") --summary-template '${classname}.${name}' filename.xml ./app/build/reports/*.xml
shell: bash
env:
TCMS_PREFIX: "Vocable Android 2022"
TCMS_PLAN_ID: "8"
# TCMS_PARENT_PLAN - if defined newly created TestPlan will be a child of this one
# TCMS_RUN_ID - if defined will report results to this TestRun
TCMS_PRODUCT: "Vocable Android"
TCMS_PRODUCT_VERSION: "1.4"
TCMS_BUILD: ${{ github.sha }}
- name: Assemble Debug Variant
env:
VERSION_CODE: ${{ github.run_number }}
run: ./gradlew assembleDebug
- name: Install Firebase CLI
if: github.event_name != 'pull_request'
run: npm install -g firebase-tools
- name: Decode Firebase Service Account JSON
if: github.event_name != 'pull_request'
run: echo ${{ secrets.FIREBASE_SERVICE_ACCOUNT_BASE_64 }} | base64 -d > service_account.json
- name: Deploy to Firebase
if: github.event_name != 'pull_request'
env:
GOOGLE_APPLICATION_CREDENTIALS: service_account.json
run: firebase appdistribution:distribute app/build/outputs/apk/debug/app-debug.apk --app ${{ secrets.FIREBASE_APP_ID }} --groups "internal"
- name: Decode Keystore
if: github.event_name != 'pull_request'
env:
ENCODED_RELEASE_KEYSTORE: ${{ secrets.ENCODED_RELEASE_KEYSTORE }}
run: echo $ENCODED_RELEASE_KEYSTORE | base64 -d > keystore
- name: Build & Assemble Release APK
if: github.event_name != 'pull_request'
env:
VERSION_CODE: ${{ github.run_number }}
VERSION_NAME: "1.0"
RELEASE_KEY_ALIAS: ${{ secrets.RELEASE_KEY_ALIAS }}
RELEASE_KEY_PASSWORD: ${{ secrets.RELEASE_KEY_PASSWORD }}
run: |
./gradlew assembleRelease
- name: Upload to Play Store
if: github.event_name != 'pull_request'
uses: r0adkll/upload-google-play@v1
with:
serviceAccountJsonPlainText: ${{ secrets.PLAY_STORE_CREDENTIALS }}
packageName: com.willowtree.vocable
releaseFiles: app/build/outputs/apk/release/app-release.apk
track: alpha