Skip to content

Commit

Permalink
Fix tests patching on failure
Browse files Browse the repository at this point in the history
  • Loading branch information
fscarponi committed Jun 14, 2024
1 parent 6d1b910 commit 82159b3
Showing 1 changed file with 88 additions and 57 deletions.
145 changes: 88 additions & 57 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,23 +19,30 @@ jobs:
- uses: actions/checkout@v4
with:
submodules: true
- name: gradle-build-action@v3
id: simple-build
uses: gradle/gradle-build-action@v3
continue-on-error: true
- name: Patch IDE config files
if: steps.simple-build.outcome == 'failure'
run: kotlinc -script ./.github/workflows/TrustKotlinGradlePluginPatch.main.kts
- name: PATCHED gradle-build-action@v3
id: patched-build
if: steps.simple-build.outcome == 'failure'
uses: gradle/gradle-build-action@v3
- uses: gradle/gradle-build-action@v3
- name: Set up JDK 11
uses: actions/setup-java@v4
with:
java-version: 11
distribution: 'temurin'
- name: Run tests
- name: Run GRADLE tests
continue-on-error: true
id: simple-build
env:
KMP: true
GRADLE_VERSION: ${{ matrix.gradle-version }}
GRADLE_ENTERPRISE_KEY: ${{ secrets.GRADLE_ENTERPRISE_KEY }}
JAVA_VERSION: ${{matrix.jdk-version}}
SPACE_INTELLIJ_NIGHTLIES_TOKEN: ${{ secrets.SPACE_INTELLIJ_NIGHTLIES_TOKEN }}
SPACE_INTELLIJ_NIGHTLIES_USERNAME: ${{ secrets.SPACE_INTELLIJ_NIGHTLIES_USERNAME }}
SPACE_PACKAGE_SEARCH_TOKEN: ${{ secrets.SPACE_PACKAGE_SEARCH_TOKEN }}
SPACE_PACKAGE_SEARCH_USERNAME: ${{ secrets.SPACE_PACKAGE_SEARCH_USERNAME }}
run: ./gradlew :plugin:test --continue --tests "com.jetbrains.packagesearch.plugin.tests.end2end.projectservice.GradleProjectTest"
- name: Patch IDE config files
if: steps.simple-build.outcome == 'failure'
run: kotlinc -script ./.github/workflows/TrustKotlinGradlePluginPatch.main.kts
- name: Run GRADLE tests PATCHED
if: steps.simple-build.outcome == 'failure'
env:
KMP: true
GRADLE_VERSION: ${{ matrix.gradle-version }}
Expand Down Expand Up @@ -63,23 +70,29 @@ jobs:
- uses: actions/checkout@v4
with:
submodules: true
- name: gradle-build-action@v3
- uses: gradle/gradle-build-action@v3
- name: Set up JDK 11
uses: actions/setup-java@v4
with:
java-version: 11
distribution: 'temurin'
- name: Run MAVEN tests
id: simple-build
uses: gradle/gradle-build-action@v3
continue-on-error: true
env:
KMP: true
GRADLE_ENTERPRISE_KEY: ${{ secrets.GRADLE_ENTERPRISE_KEY }}
JAVA_VERSION: ${{matrix.jdk-version}}
SPACE_INTELLIJ_NIGHTLIES_TOKEN: ${{ secrets.SPACE_INTELLIJ_NIGHTLIES_TOKEN }}
SPACE_INTELLIJ_NIGHTLIES_USERNAME: ${{ secrets.SPACE_INTELLIJ_NIGHTLIES_USERNAME }}
SPACE_PACKAGE_SEARCH_TOKEN: ${{ secrets.SPACE_PACKAGE_SEARCH_TOKEN }}
SPACE_PACKAGE_SEARCH_USERNAME: ${{ secrets.SPACE_PACKAGE_SEARCH_USERNAME }}
run: ./gradlew :plugin:test --continue --tests "com.jetbrains.packagesearch.plugin.tests.end2end.projectservice.MavenProjectTest"
- name: Patch IDE config files
if: steps.simple-build.outcome == 'failure'
run: kotlinc -script ./.github/workflows/TrustKotlinGradlePluginPatch.main.kts
- name: PATCHED gradle-build-action@v3
id: patched-build
- name: Run MAVEN tests Patched
if: steps.simple-build.outcome == 'failure'
uses: gradle/gradle-build-action@v3
- name: Set up JDK 11
uses: actions/setup-java@v4
with:
java-version: 11
distribution: 'temurin'
- name: Run Gradle tests
env:
KMP: true
GRADLE_ENTERPRISE_KEY: ${{ secrets.GRADLE_ENTERPRISE_KEY }}
Expand Down Expand Up @@ -109,23 +122,30 @@ jobs:
- uses: actions/checkout@v4
with:
submodules: true
- name: gradle-build-action@v3
- uses: gradle/gradle-build-action@v3
- name: Set up JDK 11
uses: actions/setup-java@v4
with:
java-version: 11
distribution: 'temurin'
- name: Run KMP tests
id: simple-build
uses: gradle/gradle-build-action@v3
continue-on-error: true
env:
KMP: true
GRADLE_VERSION: ${{ matrix.gradle-version }}
GRADLE_ENTERPRISE_KEY: ${{ secrets.GRADLE_ENTERPRISE_KEY }}
JAVA_VERSION: ${{matrix.jdk-version}}
SPACE_INTELLIJ_NIGHTLIES_TOKEN: ${{ secrets.SPACE_INTELLIJ_NIGHTLIES_TOKEN }}
SPACE_INTELLIJ_NIGHTLIES_USERNAME: ${{ secrets.SPACE_INTELLIJ_NIGHTLIES_USERNAME }}
SPACE_PACKAGE_SEARCH_TOKEN: ${{ secrets.SPACE_PACKAGE_SEARCH_TOKEN }}
SPACE_PACKAGE_SEARCH_USERNAME: ${{ secrets.SPACE_PACKAGE_SEARCH_USERNAME }}
run: ./gradlew :plugin:test --continue --tests "com.jetbrains.packagesearch.plugin.tests.end2end.projectservice.KMPGradleProjectTest"
- name: Patch IDE config files
if: steps.simple-build.outcome == 'failure'
run: kotlinc -script ./.github/workflows/TrustKotlinGradlePluginPatch.main.kts
- name: PATCHED gradle-build-action@v3
id: patched-build
- name: Run KMP tests
if: steps.simple-build.outcome == 'failure'
uses: gradle/gradle-build-action@v3
- name: Set up JDK 11
uses: actions/setup-java@v4
with:
java-version: 11
distribution: 'temurin'
- name: Run tests
env:
KMP: true
GRADLE_VERSION: ${{ matrix.gradle-version }}
Expand Down Expand Up @@ -158,23 +178,30 @@ jobs:
- uses: actions/checkout@v4
with:
submodules: true
- name: gradle-build-action@v3
id: simple-build
uses: gradle/gradle-build-action@v3
continue-on-error: true
- name: Patch IDE config files
if: steps.simple-build.outcome == 'failure'
run: kotlinc -script ./.github/workflows/TrustKotlinGradlePluginPatch.main.kts
- name: PATCHED gradle-build-action@v3
id: patched-build
if: steps.simple-build.outcome == 'failure'
uses: gradle/gradle-build-action@v3
- uses: gradle/gradle-build-action@v3
- name: Set up JDK 11
uses: actions/setup-java@v4
with:
java-version: 11
distribution: 'temurin'
- name: Run tests
- name: Run VERSION CATALOG tests
continue-on-error: true
id: simple-build
env:
KMP: true
GRADLE_VERSION: ${{ matrix.gradle-version }}
GRADLE_ENTERPRISE_KEY: ${{ secrets.GRADLE_ENTERPRISE_KEY }}
JAVA_VERSION: ${{matrix.jdk-version}}
SPACE_INTELLIJ_NIGHTLIES_TOKEN: ${{ secrets.SPACE_INTELLIJ_NIGHTLIES_TOKEN }}
SPACE_INTELLIJ_NIGHTLIES_USERNAME: ${{ secrets.SPACE_INTELLIJ_NIGHTLIES_USERNAME }}
SPACE_PACKAGE_SEARCH_TOKEN: ${{ secrets.SPACE_PACKAGE_SEARCH_TOKEN }}
SPACE_PACKAGE_SEARCH_USERNAME: ${{ secrets.SPACE_PACKAGE_SEARCH_USERNAME }}
run: ./gradlew :plugin:test --continue --tests "com.jetbrains.packagesearch.plugin.tests.end2end.projectservice.CatalogProjectTest"
- name: Patch IDE config files
if: steps.simple-build.outcome == 'failure'
run: kotlinc -script ./.github/workflows/TrustKotlinGradlePluginPatch.main.kts
- name: Run VERSION CATALOG tests PATCHED
if: steps.simple-build.outcome == 'failure'
env:
KMP: true
GRADLE_VERSION: ${{ matrix.gradle-version }}
Expand All @@ -198,23 +225,27 @@ jobs:
- uses: actions/checkout@v4
with:
submodules: true
- name: gradle-build-action@v3
- uses: gradle/gradle-build-action@v3
- name: Set up JDK 11
uses: actions/setup-java@v4
with:
java-version: 11
distribution: 'temurin'
- name: Run UNIT tests
id: simple-build
uses: gradle/gradle-build-action@v3
continue-on-error: true
env:
GRADLE_ENTERPRISE_KEY: ${{ secrets.GRADLE_ENTERPRISE_KEY }}
SPACE_INTELLIJ_NIGHTLIES_TOKEN: ${{ secrets.SPACE_INTELLIJ_NIGHTLIES_TOKEN }}
SPACE_INTELLIJ_NIGHTLIES_USERNAME: ${{ secrets.SPACE_INTELLIJ_NIGHTLIES_USERNAME }}
SPACE_PACKAGE_SEARCH_TOKEN: ${{ secrets.SPACE_PACKAGE_SEARCH_TOKEN }}
SPACE_PACKAGE_SEARCH_USERNAME: ${{ secrets.SPACE_PACKAGE_SEARCH_USERNAME }}
run: ./gradlew :plugin:utils:test
- name: Patch IDE config files
if: steps.simple-build.outcome == 'failure'
run: kotlinc -script ./.github/workflows/TrustKotlinGradlePluginPatch.main.kts
- name: PATCHED gradle-build-action@v3
id: patched-build
- name: Run UNIT tests
if: steps.simple-build.outcome == 'failure'
uses: gradle/gradle-build-action@v3
- name: Set up JDK 11
uses: actions/setup-java@v4
with:
java-version: 11
distribution: 'temurin'
- name: Run tests
env:
GRADLE_ENTERPRISE_KEY: ${{ secrets.GRADLE_ENTERPRISE_KEY }}
SPACE_INTELLIJ_NIGHTLIES_TOKEN: ${{ secrets.SPACE_INTELLIJ_NIGHTLIES_TOKEN }}
Expand Down

0 comments on commit 82159b3

Please sign in to comment.