Add coverage report generation to GitHub workflows #375
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: CI | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
tests: | |
name: Tests | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Prepare Java | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'zulu' | |
java-version: '8' | |
- name: Install Clojure tools | |
uses: DeLaGuardo/setup-clojure@12.4 | |
with: | |
cli: 'latest' | |
lein: 'latest' | |
- name: 🧪 Unit tests | |
run: lein test | |
tests-coverage: | |
name: Test Coverge | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Prepare Java | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'zulu' | |
java-version: '8' | |
- name: Install Clojure tools | |
uses: DeLaGuardo/setup-clojure@12.4 | |
with: | |
cli: 'latest' | |
lein: 'latest' | |
- name: Cache Leiningen dependencies | |
uses: actions/cache@v2 | |
with: | |
path: ~/.m2 | |
key: ${{ runner.os }}-lein-${{ hashFiles('**/project.clj') }} | |
restore-keys: ${{ runner.os }}-lein- | |
- name: 🧪 Generate coverage report | |
run: lein cloverage --lcov | |
- name: 🧪 Coveralls | |
uses: coverallsapp/github-action@master | |
with: | |
path-to-lcov: ./target/coverage/lcov.info | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
if: success() | |
continue-on-error: true | |
linters: | |
name: Linters | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Prepare Java | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'zulu' | |
java-version: '8' | |
- name: Install Clojure tools | |
uses: DeLaGuardo/setup-clojure@12.4 | |
with: | |
cli: 'latest' | |
lein: 'latest' | |
bb: 'latest' | |
clj-kondo: 'latest' | |
- name: 👍 Eastwood | |
run: bb lint:eastwood | |
- name: 👍 Kondo | |
run: bb lint:kondo | |
codestyle: | |
name: Codestyle | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Prepare Java | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'zulu' | |
java-version: '8' | |
- name: Install Clojure tools | |
uses: DeLaGuardo/setup-clojure@12.4 | |
with: | |
cli: 'latest' | |
bb: 'latest' | |
cljfmt: 'latest' | |
cljstyle: 'latest' | |
- name: 👍 cljfmt | |
run: bb style:cljfmt | |
- name: 👍 cljstyle | |
run: bb style:cljstyle | |
experimental: | |
name: Experimental | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Prepare Java | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'zulu' | |
java-version: '8' | |
- name: Install Clojure tools | |
uses: DeLaGuardo/setup-clojure@12.4 | |
with: | |
cli: 'latest' | |
bb: 'latest' | |
- name: 🧪 Unit tests (bb + test-runner) | |
run: bb test | |
- name: 🧪 splint | |
run: bb style:splint || true |