Skip to content

[IJ Plugin] Tweak cache name display for Apollo 3, 4, and incubating #3506

[IJ Plugin] Tweak cache name display for Apollo 3, 4, and incubating

[IJ Plugin] Tweak cache name display for Apollo 3, 4, and incubating #3506

Workflow file for this run

name: pr
on:
pull_request:
paths-ignore:
- 'docs/**'
- '*.md'
workflow_dispatch:
env:
DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
# Cancel any current or previous job from the same PR
concurrency:
group: ${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
tests-gradle:
if: "!startsWith(github.head_ref, 'release-')"
runs-on: macos-14
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 #v4.1.7
- uses: actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9 #v4.2.1
with:
distribution: 'temurin'
java-version: 17
- uses: gradle/actions/setup-gradle@dbbdc275be76ac10734476cc723d82dfe7ec6eda #v3.4.2
with:
gradle-home-cache-cleanup: true
- name: Build with Gradle
run: |
./gradlew ciTestsGradle
- name: Collect Diagnostics
if: always()
run: ./scripts/collect-diagnostics.main.kts
- uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 #v4.3.3
if: always()
with:
name: tests-gradle.zip
path: diagnostics.zip
tests-no-gradle:
if: "!startsWith(github.head_ref, 'release-')"
runs-on: macos-14
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 #v4.1.7
- uses: actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9 #v4.2.1
with:
distribution: 'temurin'
java-version: 17
- uses: gradle/actions/setup-gradle@dbbdc275be76ac10734476cc723d82dfe7ec6eda #v3.4.2
with:
gradle-home-cache-cleanup: true
- name: Build with Gradle
run: |
./gradlew ciTestsNoGradle --stacktrace
- name: Collect Diagnostics
if: always()
run: ./scripts/collect-diagnostics.main.kts
- uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 #v4.3.3
if: always()
with:
name: tests-no-gradle.zip
path: diagnostics.zip
tests-integration:
if: "!startsWith(github.head_ref, 'release-')"
runs-on: macos-14
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 #v4.1.7
- uses: actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9 #v4.2.1
with:
distribution: 'temurin'
java-version: 17
- uses: gradle/actions/setup-gradle@dbbdc275be76ac10734476cc723d82dfe7ec6eda #v3.4.2
with:
gradle-home-cache-cleanup: true
- name: Build with Gradle
run: |
./gradlew -p tests ciBuild
- name: Collect Diagnostics
if: always()
run: ./scripts/collect-diagnostics.main.kts
- uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 #v4.3.3
if: always()
with:
name: tests-integration.zip
path: diagnostics.zip
intellij-plugin:
if: "!startsWith(github.head_ref, 'release-')"
name: Build IntelliJ Plugin
runs-on: ubuntu-latest
outputs:
version: ${{ steps.properties.outputs.version }}
steps:
# Free GitHub Actions Environment Disk Space
- name: Maximize Build Space
run: |
sudo rm -rf /usr/share/dotnet
sudo rm -rf /opt/ghc
# Check out current repository
- name: Fetch Sources
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 #v4.1.7
# Setup Java 11 environment for the next steps
- name: Setup Java
uses: actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9 #v4.2.1
with:
distribution: 'temurin'
java-version: 17
# Set environment variables
- name: Export Properties
id: properties
shell: bash
run: |
PROPERTIES="$(./gradlew :intellij-plugin:properties --console=plain -q)"
VERSION="$(echo "$PROPERTIES" | grep "^version:" | cut -f2- -d ' ')"
NAME="$(echo "$PROPERTIES" | grep "^pluginName:" | cut -f2- -d ' ')"
echo "::set-output name=version::$VERSION"
echo "::set-output name=pluginVerifierHomeDir::~/.pluginVerifier"
./gradlew :intellij-plugin:listProductsReleases # prepare list of IDEs for Plugin Verifier
# Trigger code generation in test project, as the plugin's tests depend on it
- name: Test project codegen
run: ./gradlew -p tests :intellij-plugin-test-project:generateApolloSources
# Run tests
- name: Run Tests
run: ./gradlew :intellij-plugin:check
# Collect Tests Result of failed tests
- name: Collect Tests Result
if: ${{ failure() }}
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 #v4.3.3
with:
name: tests-result
path: ${{ github.workspace }}/intellij-plugin/build/reports/tests
# Cache Plugin Verifier IDEs
- name: Setup Plugin Verifier IDEs Cache
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 #v4.0.2
with:
path: ${{ steps.properties.outputs.pluginVerifierHomeDir }}/ides
key: plugin-verifier-${{ hashFiles('intellij-plugin/build/listProductsReleases.txt') }}
# Run Verify Plugin task and IntelliJ Plugin Verifier tool
- name: Run Plugin Verification tasks
run: ./gradlew :intellij-plugin:runPluginVerifier -Pplugin.verifier.home.dir=${{ steps.properties.outputs.pluginVerifierHomeDir }}
# Collect Plugin Verifier Result
- name: Collect Plugin Verifier Result
if: ${{ always() }}
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 #v4.3.3
with:
name: pluginVerifier-result
path: ${{ github.workspace }}/intellij-plugin/build/reports/pluginVerifier
# Prepare plugin archive content for creating artifact
- name: Prepare Plugin Artifact
id: artifact
shell: bash
run: |
cd ${{ github.workspace }}/intellij-plugin/build/distributions
FILENAME=`ls *.zip`
unzip "$FILENAME" -d content
echo "::set-output name=filename::${FILENAME:0:-4}"
# Store already-built plugin as an artifact for downloading
- name: Upload artifact
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 #v4.3.3
with:
name: ${{ steps.artifact.outputs.filename }}
path: ./intellij-plugin/build/distributions/content/*/*