This repository has been archived by the owner on Oct 6, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
af717e0
commit 3957447
Showing
3 changed files
with
145 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
name: Build | ||
|
||
on: | ||
workflow_call: | ||
|
||
permissions: | ||
pull-requests: write | ||
statuses: write | ||
checks: write | ||
|
||
jobs: | ||
assembleDebug: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 20 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
submodules: true | ||
fetch-depth: 0 | ||
ref: "refs/pull/${{ github.event.pull_request.number }}/merge" | ||
|
||
- name: Setup JDK | ||
uses: actions/setup-java@v2 | ||
with: | ||
distribution: 'zulu' | ||
java-version: '17' | ||
|
||
- name: Setup Android SDK | ||
uses: android-actions/setup-android@v2 | ||
|
||
- name: Restore bundle cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: vendor/bundle | ||
key: bundle-${{ hashFiles('**/Gemfile.lock') }} | ||
|
||
- name: Restore gradle cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: | | ||
~/.gradle/caches | ||
~/.gradle/wrapper | ||
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle', '**/*.gradle.kts') }} | ||
|
||
- name: Create release keystore | ||
run: echo "${{ secrets.RELEASE_KEYSTORE }}" | base64 -d > gradle/keystore/release.jks | ||
|
||
- name: Create local.properties | ||
run: echo > local.properties | ||
|
||
- name: Build app | ||
run: ./gradlew :app:assembleDebug |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
name: Lint | ||
|
||
on: | ||
workflow_call: | ||
|
||
permissions: | ||
pull-requests: write | ||
statuses: write | ||
checks: write | ||
|
||
jobs: | ||
detekt: | ||
if: github.event.pull_request.draft == false | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 20 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
submodules: true | ||
fetch-depth: 0 | ||
ref: "refs/pull/${{ github.event.pull_request.number }}/merge" | ||
|
||
- name: Setup JDK | ||
uses: actions/setup-java@v2 | ||
with: | ||
distribution: 'zulu' | ||
java-version: '17' | ||
|
||
- name: Setup Ruby | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: 3.1.3 | ||
|
||
- name: Setup ReviewDog | ||
uses: reviewdog/[email protected] | ||
with: | ||
reviewdog_version: latest | ||
|
||
- name: Restore gradle cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: | | ||
~/.gradle/caches | ||
~/.gradle/wrapper | ||
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle', '**/*.gradle.kts') }} | ||
|
||
- name: Create local.properties | ||
run: echo > local.properties | ||
|
||
- name: Run detekt and merge reports | ||
continue-on-error: true | ||
run: ./gradlew detekt reportMerge --continue | ||
|
||
- name: Run report with ReviewDog | ||
if: steps.detekt.outcome == 'failure' | ||
env: | ||
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: cat ./build/reports/detekt/merge.xml | | ||
reviewdog -f=checkstyle -name="detekt" -reporter="github-pr-review" | ||
|
||
- name: Comment lint check success | ||
if: steps.detekt.outcome == 'success' | ||
uses: marocchino/sticky-pull-request-comment@v2 | ||
with: | ||
header: detekt | ||
recreate: true | ||
message: | | ||
:sparkles: :sparkles: **That's perfect, passed the PR lint check perfectly!** :sparkles: :sparkles: |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
name: CI | ||
|
||
on: | ||
pull_request_target: | ||
types: [ opened, reopened, synchronize, ready_for_review, converted_to_draft ] | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event.number }} | ||
cancel-in-progress: true | ||
|
||
permissions: | ||
pull-requests: write | ||
statuses: write | ||
checks: write | ||
actions: read | ||
contents: read | ||
|
||
jobs: | ||
Lint: | ||
uses: ./.github/workflows/call-lint.yml | ||
|
||
Build: | ||
uses: ./.github/workflows/call-build.yml |