Skip to content

fix: Test only

fix: Test only #14

Workflow file for this run

name: Test
on:
push:
branches:
- "**"
pull_request:
branches:
- "**"
jobs:
doc:
runs-on: ubuntu-latest
# if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Cache Gradle
uses: actions/cache@v4
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: gradle-${{ runner.os }}-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
gradle-${{ runner.os }}
- name: Set up SDK 21
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 21
- run: chmod +x ./gradlew
- name: Build Documentation
run: ./gradlew dokkaGfm --no-daemon
- name: Install GitHub CLI
run: sudo apt-get install gh
- name: Authenticate GitHub CLI
run: gh auth login --with-token
- name: Upload Documentation to Wiki
run: |
gh repo clone Runkang10/UniversalMCAPI.wiki wiki
cp -r build/dokka/* wiki/ # Copy the generated documentation to the wiki folder
cd wiki
git add .
git commit -m "Update documentation" || echo "No changes to commit"
git push
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Cache Gradle
uses: actions/cache@v4
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: gradle-${{ runner.os }}-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
gradle-${{ runner.os }}
- name: Set up SDK 21
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 21
- run: chmod +x ./gradlew
- name: Run tests
run: ./gradlew test --no-daemon