From afabcdc94f002fd8b01f15ccc027df0b33165ab5 Mon Sep 17 00:00:00 2001 From: Paul Ambrose Date: Sun, 10 May 2026 23:13:45 -0700 Subject: [PATCH] Add GitHub Actions CI for lint and tests Add a CI workflow that runs `make lint` and `make tests` in parallel on push to master and on pull requests, with Gradle caching, JDK 17, concurrency cancellation, and uploaded reports for both jobs. Co-Authored-By: Claude Opus 4.7 (1M context) --- .github/workflows/ci.yml | 68 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..0fbbccb --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,68 @@ +name: CI + +on: + push: + branches: [master] + pull_request: + branches: [master] + +concurrency: + group: ci-${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + lint: + name: Lint (kotlinter + detekt) + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Set up JDK 17 + uses: actions/setup-java@v4 + with: + distribution: temurin + java-version: 17 + + - name: Set up Gradle + uses: gradle/actions/setup-gradle@v4 + + - name: Run lint + run: make lint + + - name: Upload reports + if: always() + uses: actions/upload-artifact@v4 + with: + name: lint-reports + path: | + build/reports/ktlint/ + build/reports/detekt/ + if-no-files-found: ignore + + test: + name: Tests + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Set up JDK 17 + uses: actions/setup-java@v4 + with: + distribution: temurin + java-version: 17 + + - name: Set up Gradle + uses: gradle/actions/setup-gradle@v4 + + - name: Run tests + run: make tests + + - name: Upload test reports + if: always() + uses: actions/upload-artifact@v4 + with: + name: test-reports + path: | + build/reports/tests/ + build/test-results/ + if-no-files-found: ignore