Add README #5
Workflow file for this run
This file contains 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 PR Check | |
on: [ pull_request ] | |
concurrency: | |
group: ${{ github.head_ref }} | |
cancel-in-progress: true | |
jobs: | |
pr: | |
name: Android PR check | |
runs-on: [ ubuntu-latest ] | |
env: | |
# TODO Platform-specific slack channel name for notifications, eg. "gmlh-android" | |
SLACK_CHANNEL: project-slack-channel-name | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: '3.0' | |
- name: Set up JDK | |
uses: actions/setup-java@v2 | |
with: | |
distribution: 'zulu' | |
java-version: '17' | |
- name: Run Lint check | |
shell: bash | |
# `lintRelease` covers androidApp module and all shared modules all at once. No need to call `lintEnterprise` and `lintRelease`. | |
run: ./gradlew --continue lintCheck lintRelease | |
- name: Run unit tests | |
shell: bash | |
# `testReleaseUnitTest` covers androidApp module and all shared modules all at once. No need to call `testEnterpriseUnitTest` and `testReleaseUnitTest`. | |
run: ./gradlew --continue testReleaseUnitTest | |
- name: Danger action | |
uses: MeilCli/danger-action@v2 | |
continue-on-error: true | |
with: | |
plugins_file: 'Gemfile' | |
danger_file: 'Dangerfile' | |
danger_id: 'danger-pr' | |
env: | |
DANGER_GITHUB_API_TOKEN: ${{ secrets.DANGER_GITHUB_API_TOKEN }} | |
- name: Slack Notification | |
if: failure() | |
uses: homoluctus/slatify@master | |
with: | |
type: "failure" | |
job_name: '*PR Check*' | |
username: GitHub | |
channel: ${{env.SLACK_CHANNEL}} | |
url: ${{ secrets.SLACK_WEB_HOOK }} | |
commit: true | |
token: ${{ secrets.GITHUB_TOKEN }} |