-
Notifications
You must be signed in to change notification settings - Fork 2
110 lines (97 loc) · 3.15 KB
/
deps-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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
name: Action for deps repo test
on:
workflow_call:
inputs:
clojureRepo:
description: "Repository name with owner."
type: string
required: true
clojureRef:
description: "The branch, tag or SHA to checkout"
type: string
required: true
subjectRepo:
description: "Subject Repository name with owner."
type: string
required: true
subjectRef:
description: "The branch, tag or SHA to checkout for subject repo"
type: string
required: true
SetUpDir:
description: "Directory setup invocation must be run from"
type: string
default: '.'
required: false
SetUpCmd:
description: "Command to invoke setup"
type: string
required: false
default: 'echo "No setup"'
testDir:
description: "Directory test invocation must be run from"
type: string
required: true
testCmd:
description: "Command to invoke test run"
type: string
required: true
javaVersion:
description: 'Java matrix versions to use for the build'
required: false
default: '["8", "11", "17", "21"]'
type: string
jobs:
test:
strategy:
matrix:
java-version: ${{ fromJson(inputs.javaVersion) }}
runs-on: ubuntu-latest
steps:
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: ${{ matrix.java-version }}
- name: Checkout Clojure Source Code
uses: actions/checkout@v4
with:
repository: ${{ inputs.clojureRepo }}
ref: ${{ inputs.clojureRef }}
path: 'clojure-source'
- name: Build Clojure from Source
run: |
cd clojure-source
mvn install -ntp -Dmaven.test.skip=true
- name: Checkout Regression Test Source Code
uses: actions/checkout@v4
with:
repository: clojure/test.regression
ref: 'main'
path: 'test-source'
- name: Install CLI
run: |
curl -L -O https://github.com/clojure/brew-install/releases/latest/download/posix-install.sh
chmod +x posix-install.sh
sudo ./posix-install.sh
clojure
- name: Determine latest snapshot version
run: |
chmod +x ./test-source/scripts/find-installed-clojure-version.sh
./test-source/scripts/find-installed-clojure-version.sh
- name: Checkout Subject Source Code
uses: actions/checkout@v4
with:
repository: ${{ inputs.subjectRepo }}
ref: ${{ inputs.subjectRef }}
path: 'subject-source'
- name: Run Setup
run: |
cd /home/runner/work/test.regression/test.regression/subject-source
cd ${{ inputs.setUpDir }}
${{ inputs.setUpCmd }}
- name: Run Tests
run: |
cd /home/runner/work/test.regression/test.regression/subject-source
cd ${{ inputs.testDir }}
clojure -Srepro -Sdeps '{:deps {org.clojure/clojure {:mvn/version "${{ env.LATEST_CLJ_BUILD }}"}}}' ${{ inputs.testCmd }}