forked from clj-commons/etaoin
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Switch from lein to clojure tools cli
Apologies to any lein lovers out there! Reference to lein either converted to clojure cli or deleted. - Figuring out how to call the official clojure distribution on Windows is an exercise in frustration. Instead we use babashka's clojure function to launch clojure. Works like a charm. - Added new bb task to download clojure deps for CI - Added an anemic pom.xml to preserve data previously held by project.clj. This will be used by release flow once I get to clj-commons#432. - Unlike lein, the clojure test-runner does not allow selection of tests based on metadata at the namespace level. To easily distinguish unit tests I moved them under a `unit` directory. - I noticed that ide tests were failing for me. This is because we are now testing with our documented minimum Clojure version of 1.9. The ide code was taking advantage of a 1.10 feature. Making it 1.9 compatible was an easy fix. - Switched to logback for logging during for dev and testing to avoid any log4j security concern stink. - Noticed that we had `./resources/` `./env/dev/resources` and `./env/test/resources`. But `resources/` contains only test resources, so I moved it under `./env/test/resources`. `./env/dev/resources` seems to be a way to turn on debug logging, so left it as that and created a deps.edn `:debug` alias for it. - Our Makefile is getting smaller. Docker tasks now certainly broken. I'll make a separate issue to deal with this (and move to bb tasks). Helps me with clj-commons#380 Closes clj-commons#432
- Loading branch information
Showing
33 changed files
with
162 additions
and
130 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ name: Test | |
|
||
on: | ||
push: | ||
branches: ['master'] | ||
branches: ['lread-*'] | ||
pull_request: | ||
|
||
jobs: | ||
|
@@ -22,8 +22,8 @@ jobs: | |
~/.m2/repository | ||
~/.deps.clj | ||
~/.gitlibs | ||
key: cljdeps-${{ hashFiles('project.clj, bb.edn') }} | ||
restore-keys: ${{ runner.os }}-cljdeps- | ||
key: cljdeps-${{ hashFiles('deps.edn', 'bb.edn') }} | ||
restore-keys: cljdeps- | ||
|
||
- name: "Setup Java" | ||
uses: actions/setup-java@v3 | ||
|
@@ -35,13 +35,11 @@ jobs: | |
uses: DeLaGuardo/[email protected] | ||
with: | ||
bb: 'latest' | ||
lein: 'latest' | ||
cli: 'latest' | ||
|
||
# This assumes downloaded deps are same for all OSes | ||
- name: Bring down deps | ||
run: | | ||
lein deps | ||
bb --version | ||
run: bb download-deps | ||
|
||
- id: set-tests | ||
name: Set test var for matrix | ||
|
@@ -69,8 +67,8 @@ jobs: | |
~/.m2/repository | ||
~/.deps.clj | ||
~/.gitlibs | ||
key: cljdeps-${{ hashFiles('project.clj, bb.edn') }} | ||
restore-keys: ${{ runner.os }}-cljdeps- | ||
key: cljdeps-${{ hashFiles('deps.edn', 'bb.edn') }} | ||
restore-keys: cljdeps- | ||
|
||
- name: "Setup Java" | ||
uses: actions/setup-java@v3 | ||
|
@@ -82,7 +80,6 @@ jobs: | |
uses: DeLaGuardo/[email protected] | ||
with: | ||
bb: 'latest' | ||
lein: 'latest' | ||
|
||
- name: Tools versions | ||
run: bb tools-versions | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{:paths ["src"] | ||
:deps {org.clojure/clojure {:mvn/version "1.9.0"} ;; min clojure version | ||
babashka/fs {:mvn/version "0.1.6"} | ||
clj-http/clj-http {:mvn/version "3.10.1"} | ||
cheshire/cheshire {:mvn/version "5.9.0"} | ||
org.clojure/tools.cli {:mvn/version "1.0.194"} | ||
org.clojure/tools.logging {:mvn/version "0.3.1"}} | ||
:aliases | ||
{:1.11 {:replace-deps {org.clojure/clojure {:mvn/version "1.11.1"}}} | ||
:debug {:extra-paths ["env/dev/resources"]} | ||
:test {:extra-paths ["test" "env/test/resources"] | ||
:extra-deps {io.github.cognitect-labs/test-runner {:git/tag "v0.5.1" :git/sha "dfb30dd"} | ||
ch.qos.logback/logback-classic {:mvn/version "1.3.0-alpha16"}} | ||
:main-opts ["-m" "cognitect.test-runner"]}}} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<configuration> | ||
<!-- Stop output INFO at start --> | ||
<statusListener class="ch.qos.logback.core.status.NopStatusListener"/> | ||
|
||
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> | ||
<encoder> | ||
<pattern>%date %-5level %logger{36} - %message%n</pattern> | ||
</encoder> | ||
</appender> | ||
|
||
<logger name="etaoin" level="debug" additivity="false"> | ||
<appender-ref ref="STDOUT"/> | ||
</logger> | ||
|
||
<root level="info"> | ||
<appender-ref ref="STDOUT"/> | ||
</root> | ||
|
||
</configuration> |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<configuration> | ||
<!-- Stop output INFO at start --> | ||
<statusListener class="ch.qos.logback.core.status.NopStatusListener"/> | ||
|
||
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> | ||
<encoder> | ||
<pattern>%date %-5level %logger{36} - %message%n</pattern> | ||
</encoder> | ||
</appender> | ||
|
||
<logger name="etaoin" level="info" additivity="false"> | ||
<appender-ref ref="STDOUT"/> | ||
</logger> | ||
|
||
<root level="info"> | ||
<appender-ref ref="STDOUT"/> | ||
</root> | ||
|
||
</configuration> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<name>etaoin</name> | ||
<description>Pure Clojure Webdriver protocol implementation</description> | ||
<url>https://github.com/clj-commons/etaoin</url> | ||
<licenses> | ||
<license> | ||
<name>Eclipse Public License</name> | ||
<url>http://www.eclipse.org/legal/epl-v10.html</url> | ||
</license> | ||
</licenses> | ||
<scm> | ||
<url>https://github.com/clj-commons/etaoin</url> | ||
<connection>scm:git:git://github.com/clj-commons/etaoin.git</connection> | ||
<developerConnection>scm:git:ssh://[email protected]/clj-commons/etaoin.git</developerConnection> | ||
</scm> | ||
<properties> | ||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | ||
</properties> | ||
<repositories> | ||
<repository> | ||
<id>clojars</id> | ||
<url>https://repo.clojars.org/</url> | ||
</repository> | ||
</repositories> | ||
<distributionManagement> | ||
<repository> | ||
<id>clojars</id> | ||
<name>Clojars repository</name> | ||
<url>https://clojars.org/repo</url> | ||
</repository> | ||
</distributionManagement> | ||
</project> |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
(ns download-deps | ||
(:require [clojure.edn :as edn] | ||
[helper.main :as main] | ||
[helper.shell :as shell] | ||
[lread.status-line :as status])) | ||
|
||
;; clojure has a -P command, but to bring down all deps we need to specify all aliases | ||
;; bb deps will be brought down just from running bb (which assumedly is how this code is run) | ||
|
||
(defn -main [& args] | ||
(when (main/doc-arg-opt args) | ||
(let [aliases (->> "deps.edn" | ||
slurp | ||
edn/read-string | ||
:aliases | ||
keys)] | ||
;; one at a time because aliases with :replace-deps will... well... you know. | ||
(status/line :detail "Bring down default deps") | ||
(shell/clojure "-P") | ||
(doseq [a aliases] | ||
(status/line :detail "Bring down deps for alias: %s" a) | ||
(shell/clojure "-P" (str "-M" a)))))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.