Skip to content

chore: Add GitHub CI configuration and format code (#2) #10

chore: Add GitHub CI configuration and format code (#2)

chore: Add GitHub CI configuration and format code (#2) #10

Workflow file for this run

name: CI
on:
push:
branches:
- main
pull_request:
merge_group:
jobs:
test:
runs-on: ${{ matrix.os }}
name: test (Java ${{ matrix.java-version }} on ${{ matrix.os-label }})
strategy:
fail-fast: false
matrix:
java-version: [ "8", "11", "17" ]
os: [ "ubuntu-latest" ]
os-label: [ "Ubuntu" ]
include:
- { java-version: "11", os: "windows-latest", os-label: "Windows" }
- { java-version: "11", os: "macos-latest", os-label: "macOS" }
steps:
- uses: actions/checkout@v2
- name: Set up JDK ${{ matrix.java-version }}
uses: actions/setup-java@v1
with:

Check failure on line 28 in .github/workflows/ci.yml

View workflow run for this annotation

GitHub Actions / CI

Invalid workflow file

The workflow is not valid. .github/workflows/ci.yml (Line: 28, Col: 14): Unexpected value '' .github/workflows/ci.yml (Line: 29, Col: 9): Unexpected value 'java-version'
java-version: ${{ matrix.java-version }}
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Code style check
run: |
./gradlew spotlessCheck
- name: Build and Test
run: ./gradlew build test
- name: Generate JaCoCo Report
run: ./gradlew jacocoTestReport
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./build/reports/jacoco/test/jacocoTestReport.xml
flags: unittests
fail_ci_if_error: true
- name: Cache Gradle packages
uses: actions/cache@v3
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-