Merge pull request #200 from discord-diabetes/feat/coroutines #277
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: Build and Test | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
scan: | |
name: Scan | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Run Detekt | |
continue-on-error: true | |
run: | | |
chmod +x gradlew | |
./gradlew detekt | |
- name: Make artifact location URIs relative | |
continue-on-error: true | |
run: | | |
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 }}/build/reports/detekt/merge.sarif | |
)" > ${{ github.workspace }}/build/reports/detekt/merge.sarif | |
- uses: github/codeql-action/upload-sarif@v2 | |
with: | |
sarif_file: ${{ github.workspace }}/build/reports/detekt/merge.sarif | |
checkout_path: ${{ github.workspace }} | |
build: | |
name: Build | |
runs-on: ubuntu-latest | |
needs: [scan] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up JDK 11 | |
uses: actions/setup-java@v1 | |
with: | |
java-version: 11 | |
- name: Build with Gradle | |
run: | | |
chmod +x gradlew | |
./gradlew stage | |
- name: Archive production artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: release | |
path: build/libs/diabot.jar |