-
-
Notifications
You must be signed in to change notification settings - Fork 20
68 lines (57 loc) · 1.81 KB
/
test.yml
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
name: CI
on: [push, pull_request]
jobs:
test-and-maybe-uberjar:
# Runs the JVM and babashka tests across all OSs and JDKs, and
# creates an uberjar when the OS and JDK matches the UBERJAR_OS
# and UBERJAR_JDK env variables respectively.
strategy:
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
jdk: [11, 17, 21]
env:
UBERJAR_OS: 'ubuntu'
UBERJAR_JDK: 8
runs-on: ${{matrix.os}}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Prepare java ${{ matrix.jdk }}
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: ${{ matrix.jdk }}
- name: Install Clojure
uses: DeLaGuardo/[email protected]
with:
# bb: '1.0.165'
cli: '1.10.3.1013'
lein: '2.9.10'
bb: latest
- name: Cache clojure dependencies
uses: actions/cache@v3
with:
path: |
~/.m2/repository
~/.gitlibs
key: cljdeps-${{ hashFiles('deps.edn', 'bb.edn', 'project.clj') }}
restore-keys: cljdeps-
# - name: Run JVM tests
# run: bb jvm-test
- name: Run babashka tests
run: |
bb babashka-test
- name: Create ubejar
if: "startsWith (matrix.os, env.UBERJAR_OS) && env.UBERJAR_JDK == matrix.jdk"
run: |
mkdir -p /tmp/release
lein do clean, uberjar
VERSION=$(cat resources/DEPS_CLJ_VERSION)
cp target/deps.clj-$VERSION-standalone.jar /tmp/release
- name: Upload artifacts
if: "startsWith (matrix.os, env.UBERJAR_OS) && env.UBERJAR_JDK == matrix.jdk"
uses: actions/upload-artifact@v2
with:
name: release
path: /tmp/release/
if-no-files-found: error