-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (40 loc) · 1.33 KB
/
Copy pathci.yml
File metadata and controls
40 lines (40 loc) · 1.33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
name: CI
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 21
- name: Install Leiningen
run: |
mkdir -p ~/.local/bin
curl https://raw.githubusercontent.com/technomancy/leiningen/stable/bin/lein \
-o ~/.local/bin/lein
chmod +x ~/.local/bin/lein
echo "$HOME/.local/bin" >> $GITHUB_PATH
~/.local/bin/lein version
- name: Cache Leiningen dependencies
uses: actions/cache@v4
with:
path: ~/.m2/repository
key: ${{ runner.os }}-lein-${{ hashFiles('project.clj') }}
restore-keys: |
${{ runner.os }}-lein-
- name: Install clj-kondo
run: |
CLJ_KONDO_VERSION="2025.01.16"
curl -sL "https://github.com/clj-kondo/clj-kondo/releases/download/v${CLJ_KONDO_VERSION}/clj-kondo-${CLJ_KONDO_VERSION}-linux-amd64.zip" \
-o clj-kondo.zip
unzip clj-kondo.zip
sudo mv clj-kondo /usr/local/bin/
clj-kondo --version
- name: Lint
run: clj-kondo --lint src test
- name: Run tests
env:
STATSBOMB_DATA_PATH: ${{ github.workspace }}/test/resources
run: lein test