From 1d95201ed98b80d805f172f0fa8f347b92ebbeb4 Mon Sep 17 00:00:00 2001 From: Nereus Ng Wei Bin Date: Mon, 19 Feb 2024 21:44:46 +0800 Subject: [PATCH 1/3] Update outdated actions version --- .github/workflows/gradle.yml | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index 1ea972e389..7e3701c389 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -11,22 +11,15 @@ jobs: steps: - name: Set up repository - uses: actions/checkout@master - - - name: Set up repository - uses: actions/checkout@master - with: - ref: master - - - name: Merge to master - run: git checkout --progress --force ${{ github.sha }} + uses: actions/checkout@v4 - name: Validate Gradle Wrapper - uses: gradle/wrapper-validation-action@v1 + uses: gradle/wrapper-validation-action@v2 - name: Setup JDK 17 - uses: actions/setup-java@v1 + uses: actions/setup-java@v4 with: + distribution: 'zulu' java-version: '17' java-package: jdk+fx From fbd39e46a88be6b44f048a7a59e4bd6d531e992a Mon Sep 17 00:00:00 2001 From: Nereus Ng Wei Bin Date: Mon, 19 Feb 2024 22:01:26 +0800 Subject: [PATCH 2/3] Add setup gradle action --- .github/workflows/gradle.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index 7e3701c389..bdbdf47761 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -23,6 +23,9 @@ jobs: java-version: '17' java-package: jdk+fx + - name: Setup Gradle + uses: gradle/actions/setup-gradle@v3 + - name: Build and check with Gradle run: ./gradlew check From 31aff3846f93112453f295a5610ad62bc0dbac85 Mon Sep 17 00:00:00 2001 From: Nereus Ng Wei Bin Date: Mon, 19 Feb 2024 22:06:49 +0800 Subject: [PATCH 3/3] Refactor workflow for IO test --- .github/workflows/gradle.yml | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index bdbdf47761..b9cf55b4d4 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -29,18 +29,14 @@ jobs: - name: Build and check with Gradle run: ./gradlew check - - name: Perform IO redirection test (*NIX) - if: runner.os == 'Linux' + - name: Perform IO redirection test working-directory: ${{ github.workspace }}/text-ui-test - run: ./runtest.sh - - - name: Perform IO redirection test (MacOS) - if: always() && runner.os == 'macOS' - working-directory: ${{ github.workspace }}/text-ui-test - run: ./runtest.sh - - - name: Perform IO redirection test (Windows) - if: always() && runner.os == 'Windows' - working-directory: ${{ github.workspace }}/text-ui-test - shell: cmd - run: runtest.bat \ No newline at end of file + shell: bash + run: | + if [[ "$RUNNER_OS" == "Linux" ]]; then + ./runtest.sh + elif [[ "$RUNNER_OS" == "macOS" ]]; then + ./runtest.sh + elif [[ "$RUNNER_OS" == "Windows" ]]; then + cmd /c runtest.bat + fi \ No newline at end of file