[CS2113-W11-2] WildWatch #2843
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Java CI | |
on: [push, pull_request] | |
jobs: | |
build: | |
strategy: | |
matrix: | |
platform: [ubuntu-latest, macos-latest, windows-latest] | |
runs-on: ${{ matrix.platform }} | |
steps: | |
- name: Set up repository | |
uses: actions/checkout@master | |
- name: Merge to master | |
run: git checkout --progress --force ${{ github.sha }} | |
- name: Validate Gradle Wrapper | |
uses: gradle/wrapper-validation-action@v1 | |
- name: Setup JDK 11 | |
uses: actions/setup-java@v1 | |
with: | |
java-version: '11' | |
java-package: jdk+fx | |
# Install dos2unix on Linux | |
- name: Install dos2unix (Linux) | |
if: runner.os == 'Linux' | |
run: sudo apt-get update && sudo apt-get install -y dos2unix | |
# Install dos2unix on macOS | |
- name: Install dos2unix (macOS) | |
if: runner.os == 'macOS' | |
run: brew install dos2unix | |
- 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' | |
working-directory: ${{ github.workspace }}/text-ui-test | |
shell: cmd | |
run: runtest.bat |