Skip to content

chore: update GitHub Actions versions #6

chore: update GitHub Actions versions

chore: update GitHub Actions versions #6

name: CI - Check Pull Requests
on:
pull_request:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Java
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'adopt'
- name: Setup Gradle cache
uses: actions/cache@v4
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
run: |
echo "Building with Gradle..."
./gradlew --no-daemon build
- name: Run unit-tests
run: |
echo "Running unit-tests"
./gradlew --no-daemon test --info
- name: Archive test results
uses: actions/upload-artifact@v4
with:
name: unit-tests-report
path: build/reports/tests/test
- name: Check Coverage
run: |
echo "Checking code coverage..."
./gradlew --no-daemon koverHtmlReport koverVerify
- name: Archive coverage results
uses: actions/upload-artifact@v4
with:
name: code-coverage-report
path: build/reports/kover/html/