Skip to content
This repository has been archived by the owner on Jun 13, 2024. It is now read-only.

chore: codeql

chore: codeql #27

Workflow file for this run

name: Kotlin CI
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
on:
workflow_dispatch:
pull_request:
paths:
- 'packages/kotlin/**'
- 'examples/kotlin/**'
- 'examples/java/**'
- '.github/workflows/kotlin-ci.yml'
- '.github/workflows/codeql.yml'
push:
branches: [main]
paths:
- 'packages/kotlin/**'
- 'examples/kotlin/**'
- 'examples/java/**'
- '.github/workflows/kotlin-ci.yml'
- '.github/workflows/codeql.yml'
defaults:
run:
working-directory: packages/kotlin
env:
GRADLE_OPTS: '-Dorg.gradle.jvmargs=-Xmx4g -Dorg.gradle.daemon=false -Dkotlin.incremental=false'
WORKING_DIRECTORY: packages/kotlin
jobs:
codeql:
name: kotlin-ci-codeql
uses: ./.github/workflows/codeql.yml
with:
language: java-kotlin
working-directory: packages/kotlin
validate:
name: kotlin-ci-validate
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@v1
coverage:
name: kotlin-ci-coverage
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 11
cache: gradle
- name: Setup Gradle
uses: gradle/[email protected]
with:
gradle-version: wrapper
- name: coverage
run: ./gradlew build check
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
flags: kotlin
fail_ci_if_error: true
verbose: true
tests:
name: kotlin-ci-test
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ['ubuntu-latest', 'macos-latest', 'windows-latest']
java-version: [11, 21]
kotlin-version: [1.9.10]
kotlin-ir-enabled: [true]
kotlin-test-mode: ['REFLECT']
include:
- excludeJniTests: false
excludeWindowsTests: false
- os: windows-latest
excludeJniTests: true
excludeWindowsTests: true
- os: macos-latest
excludeJniTests: true
# kotlin-test-mode: [ 'REFLECT', 'KSP', 'KAPT' ]
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- name: Set up JDK ${{ matrix.java-version }}
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: ${{ matrix.java-version }}
cache: gradle
- name: Setup Gradle
uses: gradle/[email protected]
with:
gradle-version: wrapper
- name: Run tests with Gradle
run: >
./gradlew build check
--stacktrace
-P"excludeJniTests=${{ matrix.excludeJniTests }}"
-P"excludeWindowsTests=${{ matrix.excludeWindowsTests }}"
-P"kotlin.version=${{ matrix.kotlin-version }}"
-P"kotlin.ir.enabled=${{ matrix.kotlin-ir-enabled }}"
-P"javaToolchainTestVersion=${{ matrix.java-version }}"
-P"kotlinTestMode=${{ matrix.kotlin-test-mode }}"