Fix annotations (#2762) #1360
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 | |
on: | |
push: | |
branches: | |
- "*" | |
paths-ignore: | |
- ".gitignore" | |
pull_request: | |
branches: | |
- "*" | |
paths-ignore: | |
- ".gitignore" | |
workflow_dispatch: | |
permissions: write-all | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
name: "Build and test" | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- uses: ./.github/actions/setup-normal-workspace | |
- name: Build with Gradle | |
run: ./gradlew assemble -x test --stacktrace | |
- uses: actions/upload-artifact@v4 | |
name: Upload development build | |
with: | |
name: "Development Build" | |
path: build/libs/*.jar | |
- name: Test with Gradle | |
run: ./gradlew test | |
- uses: actions/upload-artifact@v4 | |
name: "Upload test report" | |
if: ${{ !cancelled() }} | |
with: | |
name: "Test Results" | |
path: versions/1.8.9/build/reports/tests/test/ | |
detekt: | |
name: Run detekt | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- uses: ./.github/actions/setup-normal-workspace | |
# detektMain is a LOT slower than detekt, but it does type analysis | |
- name: Run detekt main (w/typing analysis) | |
run: | | |
./gradlew detektMain --stacktrace | |
- name: Annotate detekt failures | |
if: ${{ !cancelled() }} | |
run: | | |
chmod +x .github/scripts/process_detekt_sarif.sh | |
./.github/scripts/process_detekt_sarif.sh versions/1.8.9/build/reports/detekt/main.sarif | |
preprocess: | |
runs-on: ubuntu-latest | |
name: "Build multi version" | |
env: | |
SKIP_DETEKT: "true" | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- uses: ./.github/actions/setup-normal-workspace | |
- name: Enable preprocessor | |
run: | | |
mkdir -p .gradle | |
echo skyhanni.multi-version=preprocess-only > .gradle/private.properties | |
- name: Build with Gradle | |
run: ./gradlew build --stacktrace |