mirror of
https://github.com/DeLaGuardo/setup-clojure.git
synced 2025-01-14 02:18:07 +08:00
Small fixes
This commit is contained in:
parent
30dac88959
commit
27a3b5dc36
24
.github/workflows/smoke-tests.yml
vendored
24
.github/workflows/smoke-tests.yml
vendored
@ -7,66 +7,74 @@ jobs:
|
||||
test-tools-deps:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
|
||||
steps:
|
||||
- name: Prepare java
|
||||
uses: actions/setup-java@v1
|
||||
with:
|
||||
java-version: 1.8
|
||||
|
||||
- name: Install clojure tools-deps
|
||||
uses: DeLaGuardo/setup-clojure@master
|
||||
with:
|
||||
tools-deps: 1.10.1.469
|
||||
|
||||
- name: Execute clojure code
|
||||
run: clojure -e "(+ 1 1)"
|
||||
|
||||
|
||||
test-leiningen:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
|
||||
steps:
|
||||
- name: Prepare java
|
||||
uses: actions/setup-java@v1
|
||||
with:
|
||||
java-version: 1.8
|
||||
|
||||
- name: Install leiningen
|
||||
uses: DeLaGuardo/setup-clojure@master
|
||||
with:
|
||||
lein: 2.9.1
|
||||
|
||||
- name: Check leiningen version
|
||||
run: lein -v
|
||||
|
||||
|
||||
test-boot:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
|
||||
steps:
|
||||
- name: Prepare java
|
||||
uses: actions/setup-java@v1
|
||||
with:
|
||||
java-version: 1.8
|
||||
|
||||
- name: Install leiningen
|
||||
uses: DeLaGuardo/setup-clojure@master
|
||||
with:
|
||||
boot: 2.8.3
|
||||
|
||||
- name: Check boot version
|
||||
run: boot -V
|
||||
|
||||
|
||||
test-all-together:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
|
||||
steps:
|
||||
- name: Prepare java
|
||||
uses: actions/setup-java@v1
|
||||
with:
|
||||
java-version: 1.8
|
||||
- name: Install leiningen
|
||||
|
||||
- name: Install all the tools together
|
||||
uses: DeLaGuardo/setup-clojure@master
|
||||
with:
|
||||
tools-deps: 1.10.1.469
|
||||
lein: 2.9.1
|
||||
boot: 2.8.3
|
||||
|
||||
- name: Run checks
|
||||
run: |
|
||||
clojure -e "(+ 1 1)"
|
||||
|
8
.gitignore
vendored
8
.gitignore
vendored
@ -1,5 +1,11 @@
|
||||
# Explicitly not ignoring node_modules so that they are included in package downloaded by runner
|
||||
!node_modules/
|
||||
node_modules
|
||||
!node_modules/@actions/
|
||||
!node_modules/semver/
|
||||
!node_modules/tunnel/
|
||||
!node_modules/typed-rest-client/
|
||||
!node_modules/underscore/
|
||||
!node_modules/uuid/
|
||||
__tests__/runner/*
|
||||
|
||||
# Rest of the file pulled from https://github.com/github/gitignore/blob/master/Node.gitignore
|
||||
|
@ -39,7 +39,7 @@ describe('boot tests', () => {
|
||||
await boot.setup('2.8.3');
|
||||
const clojureDir = path.join(
|
||||
toolDir,
|
||||
'ClojureBoot',
|
||||
'Boot',
|
||||
'2.8.3',
|
||||
os.arch()
|
||||
);
|
||||
@ -51,7 +51,7 @@ describe('boot tests', () => {
|
||||
it('Uses version of boot installed in cache', async () => {
|
||||
const clojureDir: string = path.join(
|
||||
toolDir,
|
||||
'ClojureBoot',
|
||||
'Boot',
|
||||
'2.8.3',
|
||||
os.arch()
|
||||
);
|
||||
@ -64,7 +64,7 @@ describe('boot tests', () => {
|
||||
it('Doesnt use version of clojure that was only partially installed in cache', async () => {
|
||||
const clojureDir: string = path.join(
|
||||
toolDir,
|
||||
'ClojureBoot',
|
||||
'Boot',
|
||||
'2.8.3',
|
||||
os.arch()
|
||||
);
|
||||
|
@ -39,7 +39,7 @@ describe('leiningen tests', () => {
|
||||
await leiningen.setup('2.9.1');
|
||||
const clojureDir = path.join(
|
||||
toolDir,
|
||||
'ClojureLeiningen',
|
||||
'Leiningen',
|
||||
'2.9.1',
|
||||
os.arch()
|
||||
);
|
||||
@ -51,7 +51,7 @@ describe('leiningen tests', () => {
|
||||
it('Uses version of leiningen installed in cache', async () => {
|
||||
const clojureDir: string = path.join(
|
||||
toolDir,
|
||||
'ClojureLeiningen',
|
||||
'Leiningen',
|
||||
'2.9.1',
|
||||
os.arch()
|
||||
);
|
||||
@ -64,7 +64,7 @@ describe('leiningen tests', () => {
|
||||
it('Doesnt use version of clojure that was only partially installed in cache', async () => {
|
||||
const clojureDir: string = path.join(
|
||||
toolDir,
|
||||
'ClojureLeiningen',
|
||||
'Leiningen',
|
||||
'2.9.1',
|
||||
os.arch()
|
||||
);
|
||||
|
5
lefthook.yml
Normal file
5
lefthook.yml
Normal file
@ -0,0 +1,5 @@
|
||||
pre-commit:
|
||||
parallel: true
|
||||
commands:
|
||||
build:
|
||||
run: npm run build && git add ./lib/*
|
@ -43,7 +43,7 @@ if (!tempDirectory) {
|
||||
}
|
||||
function setup(version) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
let toolPath = tc.find('ClojureBoot', utils.getCacheVersionString(version), os.arch());
|
||||
let toolPath = tc.find('Boot', utils.getCacheVersionString(version), os.arch());
|
||||
if (toolPath) {
|
||||
core.info(`Boot found in cache ${toolPath}`);
|
||||
}
|
||||
@ -52,7 +52,7 @@ function setup(version) {
|
||||
let tempDir = path.join(tempDirectory, 'temp_' + Math.floor(Math.random() * 2000000000));
|
||||
const bootDir = yield installBoot(bootBootstrapFile, tempDir, version);
|
||||
core.debug(`Boot installed to ${bootDir}`);
|
||||
toolPath = yield tc.cacheDir(bootDir, 'ClojureBoot', utils.getCacheVersionString(version));
|
||||
toolPath = yield tc.cacheDir(bootDir, 'Boot', utils.getCacheVersionString(version));
|
||||
}
|
||||
core.exportVariable('BOOT_HOME', toolPath);
|
||||
core.exportVariable('BOOT_VERSION', version);
|
||||
|
@ -43,7 +43,7 @@ if (!tempDirectory) {
|
||||
}
|
||||
function setup(version) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
let toolPath = tc.find('ClojureLeiningen', utils.getCacheVersionString(version), os.arch());
|
||||
let toolPath = tc.find('Leiningen', utils.getCacheVersionString(version), os.arch());
|
||||
if (toolPath) {
|
||||
core.info(`Leiningen found in cache ${toolPath}`);
|
||||
}
|
||||
@ -52,7 +52,7 @@ function setup(version) {
|
||||
let tempDir = path.join(tempDirectory, 'temp_' + Math.floor(Math.random() * 2000000000));
|
||||
const leiningenDir = yield installLeiningen(leiningenFile, tempDir);
|
||||
core.debug(`Leiningen installed to ${leiningenDir}`);
|
||||
toolPath = yield tc.cacheDir(leiningenDir, 'ClojureLeiningen', utils.getCacheVersionString(version));
|
||||
toolPath = yield tc.cacheDir(leiningenDir, 'Leiningen', utils.getCacheVersionString(version));
|
||||
}
|
||||
core.exportVariable('LEIN_HOME', toolPath);
|
||||
core.addPath(path.join(toolPath, 'bin'));
|
||||
|
6
package-lock.json
generated
6
package-lock.json
generated
@ -32,6 +32,12 @@
|
||||
"uuid": "^3.3.2"
|
||||
}
|
||||
},
|
||||
"@arkweid/lefthook": {
|
||||
"version": "0.6.3",
|
||||
"resolved": "https://registry.npmjs.org/@arkweid/lefthook/-/lefthook-0.6.3.tgz",
|
||||
"integrity": "sha512-mKtMBRAs2YgH9J49KogVSAJWI9WJQdJkoH8LfMfHNs+foDOgLqFLEngPI8XiekHupHDH6YF5ZInbvm2ndc2uug==",
|
||||
"dev": true
|
||||
},
|
||||
"@babel/code-frame": {
|
||||
"version": "7.5.5",
|
||||
"resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.5.5.tgz",
|
||||
|
@ -26,6 +26,7 @@
|
||||
"@actions/tool-cache": "^1.1.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@arkweid/lefthook": "^0.6.3",
|
||||
"@types/jest": "^24.0.13",
|
||||
"@types/node": "^12.0.4",
|
||||
"@types/semver": "^6.0.0",
|
||||
|
@ -26,7 +26,7 @@ if (!tempDirectory) {
|
||||
|
||||
export async function setup(version: string): Promise<void> {
|
||||
let toolPath = tc.find(
|
||||
'ClojureBoot',
|
||||
'Boot',
|
||||
utils.getCacheVersionString(version),
|
||||
os.arch()
|
||||
);
|
||||
@ -49,7 +49,7 @@ export async function setup(version: string): Promise<void> {
|
||||
core.debug(`Boot installed to ${bootDir}`);
|
||||
toolPath = await tc.cacheDir(
|
||||
bootDir,
|
||||
'ClojureBoot',
|
||||
'Boot',
|
||||
utils.getCacheVersionString(version)
|
||||
);
|
||||
}
|
||||
|
@ -26,7 +26,7 @@ if (!tempDirectory) {
|
||||
|
||||
export async function setup(version: string): Promise<void> {
|
||||
let toolPath = tc.find(
|
||||
'ClojureLeiningen',
|
||||
'Leiningen',
|
||||
utils.getCacheVersionString(version),
|
||||
os.arch()
|
||||
);
|
||||
@ -48,7 +48,7 @@ export async function setup(version: string): Promise<void> {
|
||||
core.debug(`Leiningen installed to ${leiningenDir}`);
|
||||
toolPath = await tc.cacheDir(
|
||||
leiningenDir,
|
||||
'ClojureLeiningen',
|
||||
'Leiningen',
|
||||
utils.getCacheVersionString(version)
|
||||
);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user