Created
December 12, 2020 12:33
-
-
Save renanboni/0f7640f5358d162c47b315d2caf7d462 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Android Pull Request & Master CI | |
| on: | |
| pull_request: | |
| branches: | |
| - 'master' | |
| push: | |
| branches: | |
| - 'master' | |
| jobs: | |
| test: | |
| name: Run Unit Tests | |
| runs-on: ubuntu-18.04 | |
| steps: | |
| - uses: actions/checkout@v1 | |
| - name: set up JDK 1.8 | |
| uses: actions/setup-java@v1 | |
| with: | |
| java-version: 1.8 | |
| - name: Unit tests | |
| run: bash ./gradlew test --stacktrace | |
| apk: | |
| name: Generate APK | |
| runs-on: ubuntu-18.04 | |
| steps: | |
| - uses: actions/checkout@v1 | |
| - name: set up JDK 1.8 | |
| uses: actions/setup-java@v1 | |
| with: | |
| java-version: 1.8 | |
| - name: Build debug APK | |
| run: bash ./gradlew assembleDebug --stacktrace | |
| - name: Upload APK | |
| uses: actions/upload-artifact@v1 | |
| with: | |
| name: app | |
| path: app/build/outputs/apk/Axios/debug/app-Axios-debug.apk | |
| - name: Notify slack success | |
| if: success() | |
| env: | |
| SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }} | |
| uses: voxmedia/github-action-slack-notify-build@v1 | |
| with: | |
| channel: android-bot | |
| status: SUCCESS | |
| color: good | |
| - name: Notify slack fail | |
| if: failure() | |
| env: | |
| SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }} | |
| uses: voxmedia/github-action-slack-notify-build@v1 | |
| with: | |
| channel: android-bot | |
| status: FAILED | |
| color: danger | |
| - name: Notify slack new APK | |
| env: | |
| SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }} | |
| uses: pullreminders/slack-action@master | |
| with: | |
| args: '{\"channel\":\"android-bot\",\"text\":\"A new apk has been built.\"}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment