chore: CI/CD and basic infrastructure for the IntelliJ Plugin #3
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 | |
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 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 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 test | |
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 ":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 functionalTests | |
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 performanceTest | |
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" |