Skip to content

Commit

Permalink
Optimize GitHub Actions and Gradle test setup
Browse files Browse the repository at this point in the history
  • Loading branch information
fscarponi committed Mar 6, 2024
1 parent eeee5cb commit 2ae7923
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,15 @@ jobs:
8
17
distribution: 'temurin'
cache: gradle
- name: Run Gradle tests
id: test
env:
KMP: true
GRADLE_VERSION: ${{ matrix.gradle-versions }}
GRADLE_ENTERPRISE_KEY: ${{ secrets.GRADLE_ENTERPRISE_KEY }}
run: ./gradlew :plugin:test
- name: Upload test result
if: always()
if: steps.test.outcome == 'failure'
uses: actions/upload-artifact@v4
with:
name: testResult-${{ matrix.os }}-${{ matrix.gradle-versions }}
Expand Down
3 changes: 1 addition & 2 deletions plugin/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -150,10 +150,9 @@ tasks {
val testDataDirectoryPath = testDataDirectory.map { it.asFile.absolutePath }

test {
dependsOn(buildShadowPlugin)

environment("PKGS_PLUGIN_ID", pkgsPluginId)
environment("PKGS_TEST_DATA_OUTPUT_DIR", testDataDirectoryPath.get())
dependsOn(buildShadowPlugin)
val pluginArtifactDirectoryPath =
pluginArtifactDirectory.map { it.file(pluginArtifactName).asFile.absolutePath }
environment("PKGS_PLUGIN_ARTIFACT_FILE", pluginArtifactDirectoryPath.get())
Expand Down

0 comments on commit 2ae7923

Please sign in to comment.