Skip to content

Fix proguard rules. Bump version. #27

Fix proguard rules. Bump version.

Fix proguard rules. Bump version. #27

Workflow file for this run

name: Lint, Unit & Instrumented Tests
on:
push:
branches:
- development
- main
pull_request:
types:
- opened
- reopened
- synchronize
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
jobs:
gradle-lint-test:
name: Lint And Test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Download ktlint
run: curl -sSLO https://github.com/pinterest/ktlint/releases/download/1.1.1/ktlint && chmod a+x ktlint && sudo mv ktlint /usr/local/bin/
- name: Run ktlint
run: ktlint --reporter=checkstyle,output=build/ktlint-report.xml
continue-on-error: true
- name: Process ktlint report
uses: yutailang0119/action-ktlint@v3
with:
report-path: build/*.xml # Support glob patterns by https://www.npmjs.com/package/@actions/glob
continue-on-error: false # If annotations contain error of severity, action-ktlint exit 1.
- name: Create properties file
env:
API_HOST: ${{ secrets.API_HOST }}
RPC_HOST: ${{ secrets.RPC_HOST }}
NETWORK_STATUS_SERVICE_PORT: ${{ secrets.NETWORK_STATUS_SERVICE_PORT }}
ACTIVE_VALIDATOR_LIST_SERVICE_PORT: ${{ secrets.ACTIVE_VALIDATOR_LIST_SERVICE_PORT }}
INACTIVE_VALIDATOR_LIST_SERVICE_PORT: ${{ secrets.INACTIVE_VALIDATOR_LIST_SERVICE_PORT }}
VALIDATOR_DETAILS_SERVICE_PORT: ${{ secrets.VALIDATOR_DETAILS_SERVICE_PORT }}
REPORT_SERVICE_PORT: ${{ secrets.REPORT_SERVICE_PORT }}
APP_SERVICE_PORT: ${{ secrets.APP_SERVICE_PORT }}
run: |
echo "API_HOST=$API_HOST" >> subvt.properties
echo "RPC_HOST=$RPC_HOST" >> subvt.properties
echo "NETWORK_STATUS_SERVICE_PORT=$NETWORK_STATUS_SERVICE_PORT" >> subvt.properties
echo "ACTIVE_VALIDATOR_LIST_SERVICE_PORT=$ACTIVE_VALIDATOR_LIST_SERVICE_PORT" >> subvt.properties
echo "INACTIVE_VALIDATOR_LIST_SERVICE_PORT=$INACTIVE_VALIDATOR_LIST_SERVICE_PORT" >> subvt.properties
echo "VALIDATOR_DETAILS_SERVICE_PORT=$VALIDATOR_DETAILS_SERVICE_PORT" >> subvt.properties
echo "REPORT_SERVICE_PORT=$REPORT_SERVICE_PORT" >> subvt.properties
echo "APP_SERVICE_PORT=$APP_SERVICE_PORT" >> subvt.properties
- name: Set up JDK 17
uses: actions/setup-java@v2
with:
java-version: '17'
distribution: 'temurin'
- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@v1
- name: Run Gradle test
run: ./gradlew test -i
- name: Upload test report
uses: actions/upload-artifact@v2
with:
name: unit_test_report
path: subvt-data/build/reports/tests/testDebugUnitTest/
instrumentation-test:
name: Instrumentation Test
needs: [gradle-lint-test]
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Create properties file
env:
API_HOST: ${{ secrets.API_HOST }}
RPC_HOST: ${{ secrets.RPC_HOST }}
NETWORK_STATUS_SERVICE_PORT: ${{ secrets.NETWORK_STATUS_SERVICE_PORT }}
ACTIVE_VALIDATOR_LIST_SERVICE_PORT: ${{ secrets.ACTIVE_VALIDATOR_LIST_SERVICE_PORT }}
INACTIVE_VALIDATOR_LIST_SERVICE_PORT: ${{ secrets.INACTIVE_VALIDATOR_LIST_SERVICE_PORT }}
VALIDATOR_DETAILS_SERVICE_PORT: ${{ secrets.VALIDATOR_DETAILS_SERVICE_PORT }}
REPORT_SERVICE_PORT: ${{ secrets.REPORT_SERVICE_PORT }}
APP_SERVICE_PORT: ${{ secrets.APP_SERVICE_PORT }}
run: |
echo "API_HOST=$API_HOST" >> subvt.properties
echo "RPC_HOST=$RPC_HOST" >> subvt.properties
echo "NETWORK_STATUS_SERVICE_PORT=$NETWORK_STATUS_SERVICE_PORT" >> subvt.properties
echo "ACTIVE_VALIDATOR_LIST_SERVICE_PORT=$ACTIVE_VALIDATOR_LIST_SERVICE_PORT" >> subvt.properties
echo "INACTIVE_VALIDATOR_LIST_SERVICE_PORT=$INACTIVE_VALIDATOR_LIST_SERVICE_PORT" >> subvt.properties
echo "VALIDATOR_DETAILS_SERVICE_PORT=$VALIDATOR_DETAILS_SERVICE_PORT" >> subvt.properties
echo "REPORT_SERVICE_PORT=$REPORT_SERVICE_PORT" >> subvt.properties
echo "APP_SERVICE_PORT=$APP_SERVICE_PORT" >> subvt.properties
- name: Set up JDK 17
uses: actions/setup-java@v2
with:
java-version: '17'
distribution: 'temurin'
- name: Run instrumented tests
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: 24
script: ./gradlew connectedCheck
- name: Upload test report
uses: actions/upload-artifact@v2
with:
name: instrumentation_test_report
path: subvt-data/build/reports/androidTests/connected/