Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Github action workflow #79

Open
wants to merge 3 commits into
base: full-template
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 17 additions & 25 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,40 +11,32 @@ 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
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@NereusWB922 does the behavior remains the same here?


- 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

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3

- name: Build and check with Gradle
run: ./gradlew check

- name: Perform IO redirection test (*NIX)
if: runner.os == 'Linux'
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'
- name: Perform IO redirection test
working-directory: ${{ github.workspace }}/text-ui-test
shell: cmd
run: runtest.bat
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