Skip to content

Improve interaction timing: presets, start delay, and dynamic duration #12

Improve interaction timing: presets, start delay, and dynamic duration

Improve interaction timing: presets, start delay, and dynamic duration #12

Workflow file for this run

name: Lint
on:
pull_request:
types: [opened, synchronize, reopened]
permissions:
contents: read
concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Detect code changes
id: changes
run: |
BASE_SHA="${{ github.event.pull_request.base.sha }}"
HEAD_SHA="${{ github.event.pull_request.head.sha }}"
SHOULD_RUN="$(bash scripts/ci-has-code-changes.sh "$BASE_SHA" "$HEAD_SHA")"
echo "should_run=$SHOULD_RUN" >> "$GITHUB_OUTPUT"
- name: Set up JDK 17
if: steps.changes.outputs.should_run == 'true'
uses: actions/setup-java@v4
with:
java-version: 17
distribution: 'zulu'
cache: gradle
- name: Cache Gradle packages
if: steps.changes.outputs.should_run == 'true'
uses: actions/cache@v4
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Lint
if: steps.changes.outputs.should_run == 'true'
run: |
set -euo pipefail
./gradlew ktlintCheck --info
cd lib
./gradlew ktlintCheck --info
- name: Skip lint for docs-only changes
if: steps.changes.outputs.should_run != 'true'
run: echo "No code/build changes detected. Skipping lint."