From d1d35fc30b21360d31461520c25d8922f08cacd4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20Kwiecin=CC=81ski?= Date: Wed, 17 Jan 2024 19:53:18 +0100 Subject: [PATCH] Test on different machines --- .github/workflows/main.yml | 31 +++++++++++++++++++++++++++++-- action.yml | 2 +- 2 files changed, 30 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index e623533..7d16a82 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -80,8 +80,7 @@ jobs: printf "org.gradle.unsafe.configuration-cache=true" > ~/.gradle/gradle.properties shell: bash - - name: Cache - uses: gradle/gradle-build-action@v2 + - uses: gradle/gradle-build-action@v2 with: build-root-directory: testproject arguments: dependencies --no-configuration-cache @@ -115,3 +114,31 @@ jobs: comment-id: ${{ steps.find_comment.outputs.comment-id }} issue-number: ${{ github.event.pull_request.number }} token: ${{ secrets.GITHUB_TOKEN }} + + test-on-different-os: + strategy: + fail-fast: false + matrix: + os: [macos-latest, windows-latest] + runs-on: ${{ matrix.os }} + name: Execute on ${{ matrix.os }} runner + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - uses: actions/setup-java@v4 + with: + distribution: 'temurin' + java-version: 21 + + - name: Downgrade dependency version to see the diff + run: sed -i -E 's/androidx.paging:paging-common-ktx:[[:digit:]]+.[[:digit:]]+.[[:digit:]]+/androidx.paging:paging-common-ktx:3.1.0/g' testproject/build.gradle + + - id: dependency-diff + uses: ./ + if: github.event_name == 'pull_request' + with: + configuration: runtimeClasspath + build-root-directory: testproject + project: "" diff --git a/action.yml b/action.yml index 7d9c495..bf53b82 100644 --- a/action.yml +++ b/action.yml @@ -44,5 +44,5 @@ runs: INPUT_VERSION: ${{ inputs.lib-version }} ADDITIONAL_GRADLE_ARGUMENTS: ${{ inputs.additional-gradle-arguments }} INPUT_DEBUG: ${{ inputs.debug }} - run: ${{ github.action_path }}/entrypoint.sh + run: ${{ GITHUB_ACTION_PATH }}/entrypoint.sh shell: bash