-
Notifications
You must be signed in to change notification settings - Fork 55
67 lines (54 loc) · 1.75 KB
/
libs-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
name: Libs Test
on:
# allow this workflow to be called from other workflows, namely: publish
workflow_call:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
enumerate-libs:
runs-on: ubuntu-latest
outputs:
libs: ${{ steps.set-libs.outputs.libs }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup
uses: ./.github/workflows/shared-setup
- id: set-libs
name: Set libs var for matrix
## call bb script directly instead of as task to avoid task status output
run: echo "libs=$(bb script/test_libs.clj list --format=json)" >> $GITHUB_OUTPUT
libs-test:
needs: enumerate-libs
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include: ${{ fromJSON(needs.enumerate-libs.outputs.libs) }}
name: ${{ matrix.lib-name }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup
uses: ./.github/workflows/shared-setup
with:
clj-cache-prefix: clj-libs-deps-${{ matrix.lib-name }}
clj-cache-hash-files: "'script/test_libs.clj','deps.edn','bb.edn'"
## Lein version > 2.10.0 is causing refactor-nrepl to fail, so explicitly install a version that works
## instead of using lein bundled with github actions image.
## Upcoming 2.11.2 might fix, can optionally revisit in the future.
- name: Install Lein
uses: DeLaGuardo/[email protected]
with:
lein: 2.10.0
- name: Install Planck
uses: ./.github/workflows/setup-planck
if: contains( matrix.requires, 'planck' )
- name: Run Libs Tests
run: bb test-libs run ${{ matrix.lib-name }}