-
Notifications
You must be signed in to change notification settings - Fork 22
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
Bořek Leikep
committed
Oct 11, 2023
1 parent
0b6a312
commit fc5f8a7
Showing
2 changed files
with
27 additions
and
48 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 |
---|---|---|
|
@@ -7,7 +7,7 @@ on: | |
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
runs-on: macos-latest | ||
permissions: | ||
contents: write | ||
steps: | ||
|
@@ -24,47 +24,11 @@ jobs: | |
distribution: 'zulu' | ||
java-version: 18 | ||
|
||
- name: ktlint | ||
run: ./gradlew lintKotlin | ||
- name: Setup Android SDK | ||
uses: android-actions/setup-android@v3 | ||
|
||
- name: Tests & Detekt & Android lint | ||
run: ./gradlew :catalog:assembleDebug lintDebug :ui:detektAndroidDebug :ui:testDebugUnitTest :lint:test | ||
# - name: Accept Licences | ||
# run: echo y | sdkmanager --licenses | ||
|
||
- name: Run Screenshot Tests | ||
run: ./gradlew :ui:verifyPaparazziDebug | ||
|
||
- uses: yutailang0119/[email protected] | ||
name: App Lint errors to annotations | ||
if: ${{ failure() }} | ||
continue-on-error: true # lint may be ok | ||
with: | ||
xml_path: app/build/reports/lint-results-debug.xml | ||
- uses: yutailang0119/[email protected] | ||
name: Lib Lint errors to annotations | ||
if: ${{ failure() }} | ||
continue-on-error: true # lint may be ok | ||
with: | ||
xml_path: lib/build/reports/lint-results-debug.xml | ||
- name: KTLint errors to annotations | ||
if: ${{ failure() }} | ||
run: | | ||
jq --raw-output '[.[] | ({ f: .file } + ( .errors[] | { l: .line, c: .column, m: .message, r: .rule } )) | "::error file=catalog/\(.f),line=\(.l),col=\(.c)::\(.m) [\(.r)]" ] | join("\n")' catalog/build/reports/ktlint/main-lint.json || true | ||
jq --raw-output '[.[] | ({ f: .file } + ( .errors[] | { l: .line, c: .column, m: .message, r: .rule } )) | "::error file=generator/\(.f),line=\(.l),col=\(.c)::\(.m) [\(.r)]" ] | join("\n")' generator/build/reports/ktlint/main-lint.json || true | ||
jq --raw-output '[.[] | ({ f: .file } + ( .errors[] | { l: .line, c: .column, m: .message, r: .rule } )) | "::error file=icons/\(.f),line=\(.l),col=\(.c)::\(.m) [\(.r)]" ] | join("\n")' icons/build/reports/ktlint/main-lint.json || true | ||
jq --raw-output '[.[] | ({ f: .file } + ( .errors[] | { l: .line, c: .column, m: .message, r: .rule } )) | "::error file=illustrations/\(.f),line=\(.l),col=\(.c)::\(.m) [\(.r)]" ] | join("\n")' illustrations/build/reports/ktlint/main-lint.json || true | ||
jq --raw-output '[.[] | ({ f: .file } + ( .errors[] | { l: .line, c: .column, m: .message, r: .rule } )) | "::error file=ui/\(.f),line=\(.l),col=\(.c)::\(.m) [\(.r)]" ] | join("\n")' ui/build/reports/ktlint/main-lint.json || true | ||
- uses: actions/upload-artifact@v3 | ||
if: ${{ failure() }} | ||
with: | ||
name: shots-results | ||
path: ui/out/failures | ||
- name: Build Dokka HTML | ||
if: ${{ github.ref == 'refs/heads/main' }} | ||
run: | | ||
./gradlew :dokkaHtmlMultiModule --no-configuration-cache | ||
- name: Deploy Dokka HTML | ||
uses: peaceiris/actions-gh-pages@v3 | ||
if: ${{ github.ref == 'refs/heads/main' }} | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: ./build/dokka/htmlMultiModule | ||
- name: Generate Baseline Profile | ||
run: ./gradlew :catalog:generateReleaseBaselineProfile :icons:generateBaselineProfile :illustrations:generateBaselineProfile :ui:generateBaselineProfile -Pandroid.testInstrumentationRunnerArguments.androidx.benchmark.enabledRules=baselineprofile -Pandroid.testoptions.manageddevices.emulator.gpu=swiftshader_indirect --stacktrace |
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