PeopleInSpace/.github/workflows/android.yml

62 lines
1.7 KiB
YAML
Raw Normal View History

2020-02-14 21:17:34 +00:00
name: Android CI
2021-06-20 10:00:55 +00:00
on: [push, pull_request]
2020-02-14 21:17:34 +00:00
jobs:
build:
runs-on: macos-latest
steps:
2021-07-19 21:54:19 +00:00
- uses: actions/checkout@v2
2021-06-20 10:00:55 +00:00
- name: set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 11
- name: Build android app
run: ./gradlew assembleDebug
2021-07-09 20:41:58 +00:00
2021-06-20 10:00:55 +00:00
- name: Run Unit Tests
run: ./gradlew test
- name: Build web app
run: ./gradlew :web:assemble
- name: Build iOS shared code
run: ./gradlew :common:compileKotlinIOS
- name: Build macOS shared code
run: ./gradlew :common:compileKotlinMacOS
2020-09-07 19:07:23 +00:00
2021-06-20 10:00:55 +00:00
# If main branch update, deploy to gh-pages
- name: Deploy
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main'
uses: JamesIves/github-pages-deploy-action@3.7.1
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages # The branch the action should deploy to.
FOLDER: web/build/distributions # The folder the action should deploy.
2021-07-19 21:32:04 +00:00
CLEAN: true # Automatically remove deleted files from the deploy branch
androidTest:
runs-on: macos-latest
steps:
2021-07-19 21:54:19 +00:00
- name: Checkout
uses: actions/checkout@v2
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 11
2021-10-10 16:36:46 +00:00
- name: Wear Instrumentation Tests
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: 28
target: android-wear
script: ./gradlew wear:connectedAndroidTest
- name: Android Instrumentation Tests
2021-07-19 21:32:04 +00:00
uses: reactivecircus/android-emulator-runner@v2
with:
2021-07-19 21:54:19 +00:00
api-level: 29
2021-07-19 21:38:44 +00:00
target: google_apis
2021-10-10 16:36:46 +00:00
script: ./gradlew app:connectedAndroidTest common:connectedAndroidTest