Check #71
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: Check | |
defaults: | |
run: | |
shell: bash | |
on: | |
workflow_dispatch: | |
workflow_call: | |
jobs: | |
check: | |
name: Check on ubuntu-latest | |
runs-on: ubuntu-latest | |
env: | |
GRADLE_OPTS: "-Dorg.gradle.daemon=true" | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-java@v3 | |
with: | |
distribution: 'adopt' | |
java-version: 11 | |
- name: Restore Gradle cache | |
id: cache | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.gradle/caches | |
~/.gradle/wrapper | |
~/.gradle/yarn | |
~/.gradle/nodejs | |
~/.konan | |
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} | |
restore-keys: ${{ runner.os }}-gradle- | |
- name: Gradle Check | |
run: ./gradlew detekt check --scan | |
- name: Make artifact location URIs relative | |
if: ${{ always() }} | |
continue-on-error: true | |
run: | | |
cp ${{ github.workspace }}/npm-publish-gradle-plugin/build/reports/detekt/detekt.sarif ${{ github.workspace }}/detekt.sarif.json | |
echo "$( | |
jq \ | |
--arg github_workspace ${{ github.workspace }} \ | |
'. | ( .runs[].results[].locations[].physicalLocation.artifactLocation.uri |= if test($github_workspace) then .[($github_workspace | length | . + 1):] else . end )' \ | |
${{ github.workspace }}/detekt.sarif.json | |
)" > ${{ github.workspace }}/detekt.sarif.json | |
- uses: github/codeql-action/upload-sarif@v2 | |
if: ${{ always() }} | |
with: | |
sarif_file: ${{ github.workspace }}/detekt.sarif.json | |
checkout_path: ${{ github.workspace }} | |
- name: Gradle Assemble | |
run: ./gradlew assemble --scan | |
- uses: actions/upload-artifact@v3 | |
if: ${{ always() }} | |
with: | |
name: reports-${{ runner.os }} | |
path: | | |
**/build/reports | |
- name: Gradle Check Sandbox | |
working-directory: sandbox | |
run: ../gradlew check assemble pack publish --scan | |
- uses: actions/upload-artifact@v3 | |
if: ${{ always() }} | |
with: | |
name: sandbox-${{ runner.os }} | |
path: | | |
sandbox/**/build/reports | |
sandbox/**/build/publications | |
- name: Gradle Check Samples | |
working-directory: samples | |
run: ../gradlew check assemble pack publish --scan | |
- uses: actions/upload-artifact@v3 | |
if: ${{ always() }} | |
with: | |
name: samples-${{ runner.os }} | |
path: | | |
samples/**/build/reports | |
samples/**/build/publications | |
- name: ts-consumer Install | |
working-directory: sandbox/ts-consumer | |
run: yarn install | |
- name: ts-consumer Build | |
working-directory: sandbox/ts-consumer | |
run: yarn build | |
- name: ts-consumer Run | |
working-directory: sandbox/ts-consumer | |
run: yarn start | |
- uses: actions/upload-artifact@v3 | |
if: ${{ always() }} | |
with: | |
name: ts-consumer-${{ runner.os }} | |
path: | | |
sandbox/ts-consumer/build | |
sandbox/ts-consumer/node_modules/@mpetuska |