Skip to content

Implement comprehensive testing infrastructure with MockK and Kotest #1

Implement comprehensive testing infrastructure with MockK and Kotest

Implement comprehensive testing infrastructure with MockK and Kotest #1

Workflow file for this run

name: Tests
on:
push:
branches: [ main, develop ]
pull_request:
branches: [ main, develop ]
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'
- name: Cache Gradle packages
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: Validate test infrastructure
run: ./validate-tests.sh
- name: Run tests
run: ./gradlew test --no-daemon
- name: Generate test report
uses: dorny/test-reporter@v1
if: success() || failure()
with:
name: Test Results
path: build/test-results/test/*.xml
reporter: java-junit
- name: Upload test results
uses: actions/upload-artifact@v4
if: always()
with:
name: test-results
path: build/test-results/test/
- name: Upload test reports
uses: actions/upload-artifact@v4
if: always()
with:
name: test-reports
path: build/reports/tests/test/