Skip to content

[CS2103T-W13-2] CareConnect #15548

[CS2103T-W13-2] CareConnect

[CS2103T-W13-2] CareConnect #15548

Workflow file for this run

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: Build and check with Gradle
run: ./gradlew check coverage --info
- name: Upload tests artifact
uses: actions/upload-artifact@v4
with:
name: 'test-report-${{ matrix.platform }}'
path: 'build/reports/tests/test'
- name: Upload checkstyle artifact
uses: actions/upload-artifact@v4
with:
name: 'checkstyle-report-${{ matrix.platform }}'
path: 'build/reports/checkstyle'
- name: Upload coverage reports to Codecov
if: runner.os == 'Linux'
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}