tueem 6dc1446143
All checks were successful
github-mirror / push-github (push) Successful in 4s
Build / Gradle-Build (push) Successful in 1m2s
Test / Gradle-Test (push) Successful in 31s
fix directory not existing failing the job
2025-02-07 14:40:22 +01:00

53 lines
1.3 KiB
YAML

name: Test
on:
push:
jobs:
Gradle-Test:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up JDK
uses: actions/setup-java@v4
with:
java-version: '23'
check-latest: true
distribution: 'zulu'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
with:
add-job-summary: always
cache-cleanup: on-success
- name: Cache Gradle dependencies
uses: actions/cache@v4
with:
path: |
~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Test
env:
DISCORD_TEST_TOKEN: ${{ secrets.DISCORD_TOKEN }}
run: chmod +x gradlew; ./gradlew test
- name: Move Test Results
if: always()
continue-on-error: true
run: |
mkdir test-results/;
[ -d app/build/test-results/test/ ] && mv app/build/test-results/test/*.xml test-results/ || true
- name: Upload Test Result
uses: christopherhx/gitea-upload-artifact@v4
if: always()
with:
name: test-results
path: test-results/