Merge pull request #68 from openfga/dependabot/gradle/dependencies-47… #90
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: Pull Request build and test | |
on: | |
workflow_call: | |
workflow_dispatch: | |
merge_group: | |
pull_request: | |
push: | |
branches: | |
- main | |
env: | |
PLUGIN_ARTIFACT_NAME: 'openfga_intellij_plugin' | |
DIST_FOLDER: 'build/distributions' | |
jobs: | |
build: | |
name: Build OpenFGA plugin for IntelliJ Platform | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- name: Setup Java 17 | |
uses: actions/setup-java@8df1039502a15bceb9433410b1a100fbe190c53b # v4.5.0 | |
with: | |
java-version: 17 | |
distribution: 'temurin' | |
- name: Build the plugin using Gradle | |
run: ./gradlew check buildPlugin | |
- name: Upload artifacts | |
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 | |
with: | |
name: '${{ env.PLUGIN_ARTIFACT_NAME }}' | |
path: '${{ env.DIST_FOLDER }}/' | |
test_compatibility: | |
name: Test plugin compatibility with IntelliJ Platform 2024.1 | |
needs: | |
- build | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
ide-version: | |
- clion:2024.3 | |
- goland:2024.3 | |
- ideaIC:2024.3 | |
- ideaIU:2024.3 | |
- phpstorm:2024.3 | |
- pycharmPC:2024.3 | |
- pycharmPY:2024.3 | |
- riderRD:2024.3 | |
- webstorm:2024.3 | |
- ideaIC:LATEST-EAP-SNAPSHOT | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- name: Download built plugin artifact | |
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 | |
with: | |
name: ${{ env.PLUGIN_ARTIFACT_NAME }} | |
path: ${{ env.DIST_FOLDER }} | |
- name: Verify Plugin on IntelliJ Platforms | |
id: verify | |
uses: ChrisCarini/intellij-platform-plugin-verifier-action@9e042b5f5996a37ac60ea718afb53a5ca1a6bb78 # v2.0.2 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
ide-versions: ${{ matrix.ide-version }} | |
plugin-location: '${{ env.DIST_FOLDER }}/*.zip' | |
- name: Get log file path and print contents | |
run: | | |
echo "The verifier log file [${{steps.verify.outputs.verification-output-log-filename}}] contents : " ; | |
cat ${{steps.verify.outputs.verification-output-log-filename}} |