.github/workflows/kotlin-tests.yml
name: Kotlin Tests
on:
push:
branches:
- main
pull_request:
jobs:
test:
runs-on: ubuntu-latest # Assuming Kotlin projects can be built on Linux
steps:
- uses: actions/checkout@v2
- name: Set up JDK 11
uses: actions/setup-java@v2
with:
java-version: '11'
distribution: 'adopt'
- name: Cache Gradle packages
uses: actions/cache@v2
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
restore-keys: |
${{ runner.os }}-gradle-
- uses: ruby/setup-ruby@v1
with:
bundler-cache: true # Runs 'bundle install' and caches installed gems automatically
- name: Generate Kotlin Code & Run Tests
run: bundle exec rake test_kotlin