2020-02-14 21:17:34 +00:00
|
|
|
name: Android CI
|
|
|
|
|
2020-07-05 12:16:35 +00:00
|
|
|
on: [push, pull_request]
|
2020-02-14 21:17:34 +00:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
|
|
|
|
runs-on: macos-latest
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v1
|
2020-12-01 19:09:28 +00:00
|
|
|
- name: set up JDK 11
|
2020-02-14 21:17:34 +00:00
|
|
|
uses: actions/setup-java@v1
|
|
|
|
with:
|
2020-12-01 19:09:28 +00:00
|
|
|
java-version: 11
|
2020-09-07 19:07:23 +00:00
|
|
|
- name: Build android app
|
2020-02-14 21:17:34 +00:00
|
|
|
run: ./gradlew assembleDebug
|
2020-12-14 20:54:52 +00:00
|
|
|
- name: Run Unit Tests
|
|
|
|
run: ./gradlew test
|
2020-09-07 19:07:23 +00:00
|
|
|
- name: Build web app
|
|
|
|
run: ./gradlew :web:assemble
|
2020-09-07 19:07:23 +00:00
|
|
|
- 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-02-05 14:19:48 +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.
|
|
|
|
CLEAN: true # Automatically remove deleted files from the deploy branch
|