Update workflow for build job #91
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Check PR | |
on: | |
pull_request: | |
branches: ["main"] | |
paths-ignore: | |
- "docs/**" | |
- "art/**" | |
- "*.md" | |
concurrency: | |
group: pull_request-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
spotless: | |
runs-on: ubuntu-latest | |
timeout-minutes: 60 | |
permissions: | |
contents: write | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Setup java | |
uses: actions/setup-java@v4 | |
with: | |
distribution: "zulu" | |
java-version: 17 | |
- name: Apply spotless rules | |
run: ./gradlew spotlessApply | |
- name: Commit newly formatted files | |
uses: stefanzweifel/git-auto-commit-action@v5 | |
with: | |
file_pattern: "**/*.kt **/*.gradle.kts **/*.yml" | |
build: | |
strategy: | |
matrix: | |
os: [ macos-latest, ubuntu-latest ] | |
job: [ test ] | |
runs-on: ${{ matrix.os }} | |
permissions: | |
contents: read | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup java | |
uses: actions/setup-java@v4 | |
with: | |
distribution: "zulu" | |
java-version: 17 | |
- name: Setup gradle | |
uses: gradle/actions/setup-gradle@v3 | |
# macos-latest | |
- name: Run tests on ${{ matrix.os }} | |
if: matrix.os == 'macos-latest' && matrix.job == 'test' | |
run: ./gradlew iosX64Test | |
# ubuntu-latest | |
- name: Run tests on ${{ matrix.os }} | |
if: matrix.os == 'ubuntu-latest' && matrix.job == 'test' | |
run: | | |
./gradlew testDebugUnitTest desktopTest wasmJsTest |