[CS2103T-T08-3] CaféConnect #3443
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@main | |
- name: Set up repository | |
uses: actions/checkout@main | |
with: | |
ref: master | |
- name: Merge to master | |
run: git checkout --progress --force ${{ github.sha }} | |
- name: Run repository-wide tests | |
if: runner.os == 'Linux' | |
working-directory: ${{ github.workspace }}/.github | |
run: ./run-checks.sh | |
- name: Validate Gradle Wrapper | |
uses: gradle/actions/wrapper-validation@v3 | |
- name: Setup JDK 17 | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'zulu' | |
java-version: '17' | |
java-package: jdk+fx | |
- name: Install Xvfb on Linux | |
if: runner.os == 'Linux' | |
run: sudo apt-get update && sudo apt-get install -y xvfb | |
- name: Run tests with Monocle on Linux | |
if: runner.os == 'Linux' | |
run: xvfb-run --auto-servernum --server-args='-screen 0 1024x768x24' ./gradlew check coverage | |
- name: Run tests on other platforms | |
if: runner.os != 'Linux' | |
run: ./gradlew check coverage | |
- name: Upload coverage reports to Codecov | |
if: runner.os == 'Linux' | |
uses: codecov/codecov-action@v4 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} |