Skip to content

Commit 15c9fc8

Browse files
authored
Merge pull request #89 from DeLaGuardo/migrate-to-gh-releases
Migrate to GH releases for Clojure CLI
2 parents 1c76ab0 + fdcd988 commit 15c9fc8

File tree

14 files changed

+2978
-2375
lines changed

14 files changed

+2978
-2375
lines changed

.github/workflows/smoke-tests.yml

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,32 @@ jobs:
5050
- name: Install Clojure CLI
5151
uses: ./
5252
with:
53-
cli: 1.10.1.693
53+
cli: 1.11.1.1409
54+
55+
- name: Execute clojure code
56+
run: clojure -e "(+ 1 1)"
57+
58+
test-clojure-cli-latest:
59+
strategy:
60+
matrix:
61+
os: [ubuntu-latest, macOS-latest, windows-latest]
62+
63+
runs-on: ${{ matrix.os }}
64+
65+
steps:
66+
- name: Checkout
67+
uses: actions/checkout@main
68+
69+
- name: Prepare java
70+
uses: actions/setup-java@v3
71+
with:
72+
distribution: 'zulu'
73+
java-version: '8'
74+
75+
- name: Install Clojure CLI
76+
uses: ./
77+
with:
78+
cli: latest
5479

5580
- name: Execute clojure code
5681
run: clojure -e "(+ 1 1)"

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ jobs:
4646
java-version: '8'
4747

4848
- name: Install clojure tools
49-
uses: DeLaGuardo/setup-clojure@11.0
49+
uses: DeLaGuardo/setup-clojure@12.0
5050
with:
5151
# Install just one or all simultaneously
5252
# The value must indicate a particular version of the tool, or use 'latest'

__tests__/tdeps.test.ts

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,11 @@ jest.mock('@actions/http-client', () => {
3737
return {
3838
HttpClient: jest.fn().mockImplementation(() => {
3939
return {
40-
get: jest.fn().mockImplementation(() => {
40+
getJson: jest.fn().mockImplementation(() => {
4141
return {
42-
readBody: jest.fn().mockResolvedValue('1.2.3 123qwe')
42+
result: {
43+
tag_name: '1.2.3'
44+
}
4345
}
4446
})
4547
}
@@ -76,7 +78,9 @@ describe('tdeps tests', () => {
7678
await tdeps.setup('1.10.1.469')
7779

7880
expect(tc.downloadTool).toHaveBeenCalledWith(
79-
'https://download.clojure.org/install/linux-install-1.10.1.469.sh'
81+
'https://download.clojure.org/install/linux-install-1.10.1.469.sh',
82+
undefined,
83+
undefined
8084
)
8185
expect(io.mkdirP).toHaveBeenCalledWith('/tmp/usr/local/opt/ClojureTools')
8286
expect(exec.exec).toHaveBeenCalledWith('bash', [
@@ -105,7 +109,9 @@ describe('tdeps tests', () => {
105109
await tdeps.setup('latest')
106110

107111
expect(tc.downloadTool).toHaveBeenCalledWith(
108-
'https://download.clojure.org/install/linux-install-1.2.3.sh'
112+
'https://download.clojure.org/install/linux-install-1.2.3.sh',
113+
undefined,
114+
undefined
109115
)
110116
expect(io.mkdirP).toHaveBeenCalledWith('/tmp/usr/local/opt/ClojureTools')
111117
expect(exec.exec).toHaveBeenCalledWith('bash', [
@@ -136,10 +142,12 @@ describe('tdeps tests', () => {
136142
tc.downloadTool.mockResolvedValueOnce(downloadPath)
137143
tc.cacheDir.mockResolvedValueOnce(cachePath)
138144

139-
await tdeps.setup('latest')
145+
await tdeps.setup('latest', 'foo')
140146

141147
expect(tc.downloadTool).toHaveBeenCalledWith(
142-
'https://download.clojure.org/install/linux-install-1.2.3.sh'
148+
'https://download.clojure.org/install/linux-install-1.2.3.sh',
149+
undefined,
150+
'foo'
143151
)
144152
expect(io.mkdirP).toHaveBeenCalledWith('/tmp/usr/local/opt/ClojureTools')
145153
expect(fs.writeFile).toHaveBeenCalledWith(

dist/index.js

Lines changed: 222 additions & 47 deletions
Large diffs are not rendered by default.

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)