chore: CI/CD and basic infrastructure for the IntelliJ Plugin #5
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: Quality Check | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
permissions: | |
contents: write | |
pull-requests: write | |
checks: write | |
jobs: | |
catalog-check: | |
name: 'Catalog Updates Check' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup JDK | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'adopt' | |
java-version: '17' | |
cache: 'gradle' | |
- name: Run Dependency Updates | |
run: | | |
./gradlew --quiet --console=plain dependencyUpdates | |
style-check: | |
name: 'Style Check' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup JDK | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'adopt' | |
java-version: '17' | |
cache: 'gradle' | |
- name: Run Linter | |
run: | | |
./gradlew --quiet --console=plain spotlessApply | |
unit-tests: | |
name: 'Unit Tests' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup JDK | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'adopt' | |
java-version: '17' | |
cache: 'gradle' | |
- name: SBOM Generation | |
run: | | |
./gradlew --quiet --console=plain test | |
- name: Publish Unit Test Report | |
uses: mikepenz/action-junit-report@v4 | |
if: success() || failure() # always run even if the previous step fails | |
with: | |
report_paths: '**/build/test-results/test/TEST-*.xml' | |
cyclonedx-sbom-generation: | |
name: 'SBOM Generation' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup JDK | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'adopt' | |
java-version: '17' | |
cache: 'gradle' | |
- name: SBOM Generation | |
run: | | |
./gradlew --quiet --console=plain ":packages:jetbrains-plugin:cyclonedxBom" | |
functional-tests: | |
name: 'Functional & UI Tests' | |
runs-on: ubuntu-latest | |
needs: | |
- catalog-check | |
- style-check | |
- unit-tests | |
- cyclonedx-sbom-generation | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup JDK | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'adopt' | |
java-version: '17' | |
cache: 'gradle' | |
- name: Functional Tests | |
run: | | |
./gradlew --quiet --console=plain ":packages:jetbrains-plugin:test" | |
- name: Publish Functional Test Report | |
uses: mikepenz/action-junit-report@v4 | |
if: success() || failure() # always run even if the previous step fails | |
with: | |
report_paths: '**/build/test-results/test/TEST-*.xml' | |
test-coverage: | |
name: 'Test Coverage' | |
runs-on: ubuntu-latest | |
needs: | |
- unit-tests | |
- functional-tests | |
steps: | |
- uses: madrapps/[email protected] | |
with: | |
paths: | | |
${{ github.workspace }}/**/build/reports/jacoco/prodNormalDebugCoverage/prodNormalDebugCoverage.xml, | |
${{ github.workspace }}/**/build/reports/jacoco/**/debugCoverage.xml | |
token: ${{ secrets.GITHUB_TOKEN }} | |
min-coverage-overall: 70 | |
min-coverage-changed-files: 85 | |
title: "Coverage Report" | |
update-comment: true | |
continue-on-error: true | |
pass-emoji: "✅" | |
fail-emoji: "🚫" | |
fitness-check: | |
name: "Fitness Check" | |
runs-on: ubuntu-latest | |
needs: | |
- test-coverage | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup JDK | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'adopt' | |
java-version: '17' | |
cache: 'gradle' | |
- name: Performance Tests | |
run: | | |
./gradlew --quiet --console=plain ":packages:jetbrains-plugin:jmh" | |
verify-plugin: | |
name: "Verify Plugin" | |
runs-on: ubuntu-latest | |
needs: | |
- fitness-check | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup JDK | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'adopt' | |
java-version: '17' | |
cache: 'gradle' | |
- name: Verify Plugin | |
run: | | |
./gradlew ":packages:jetbrains-plugin:runPluginVerifier" |