Compare commits
2 commits
main
...
release_ac
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a7c6c306e7 | ||
|
|
224aeeebbe |
7 changed files with 28 additions and 28 deletions
4
.github/actions/setup-build/action.yml
vendored
4
.github/actions/setup-build/action.yml
vendored
|
|
@ -3,12 +3,12 @@ description: Sets up Build
|
|||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- uses: actions/setup-java@v4
|
||||
- uses: actions/setup-java@v3
|
||||
with:
|
||||
java-version: '8'
|
||||
distribution: temurin
|
||||
- name: Cache dependencies
|
||||
uses: actions/cache@v4
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: ~/.m2/repository
|
||||
key: ${{ runner.os }}-lein-${{ hashFiles('**/project.clj') }}
|
||||
|
|
|
|||
6
.github/workflows/clojure.yml
vendored
6
.github/workflows/clojure.yml
vendored
|
|
@ -2,9 +2,9 @@ name: Clojure CI
|
|||
|
||||
on:
|
||||
push:
|
||||
branches: [ main ]
|
||||
branches: [ master ]
|
||||
pull_request:
|
||||
branches: [ main ]
|
||||
branches: [ master ]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
|
@ -13,7 +13,7 @@ jobs:
|
|||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v3
|
||||
- name: Setup Build
|
||||
uses: ./.github/actions/setup-build
|
||||
- name: Install dependencies
|
||||
|
|
|
|||
2
.github/workflows/release.yml
vendored
2
.github/workflows/release.yml
vendored
|
|
@ -13,7 +13,7 @@ jobs:
|
|||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout Code
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Setup Build
|
||||
|
|
|
|||
12
deps.edn
12
deps.edn
|
|
@ -1,27 +1,27 @@
|
|||
{:paths ["src" "resources"]
|
||||
|
||||
:deps {org.clojure/clojure {:mvn/version "1.10.3"}
|
||||
org.testcontainers/testcontainers {:mvn/version "1.19.7"}}
|
||||
org.testcontainers/testcontainers {:mvn/version "1.17.6"}}
|
||||
|
||||
:aliases {:dev {:extra-paths "dev-src"}
|
||||
:test {:extra-paths ["test" "test/resources"]
|
||||
:extra-deps {expound/expound {:mvn/version "0.9.0"}
|
||||
lambdaisland/kaocha {:mvn/version "1.88.1376"}
|
||||
lambdaisland/kaocha {:mvn/version "1.71.1119"}
|
||||
lambdaisland/kaocha-cloverage {:mvn/version "1.1.89"}
|
||||
lambdaisland/kaocha-junit-xml {:mvn/version "1.17.101"}
|
||||
org.clojure/test.check {:mvn/version "1.1.1"}
|
||||
org.testcontainers/postgresql {:mvn/version "1.19.7"}}}
|
||||
org.testcontainers/postgresql {:mvn/version "1.17.6"}}}
|
||||
|
||||
:test-runner {:extra-paths ["test" "test/resources"]
|
||||
:extra-deps {expound/expound {:mvn/version "0.9.0"}
|
||||
lambdaisland/kaocha {:mvn/version "1.88.1376"}
|
||||
lambdaisland/kaocha {:mvn/version "1.71.1119"}
|
||||
lambdaisland/kaocha-cloverage {:mvn/version "1.1.89"}
|
||||
lambdaisland/kaocha-junit-xml {:mvn/version "1.17.101"}
|
||||
org.clojure/test.check {:mvn/version "1.1.1"}
|
||||
orchestra {:mvn/version "2021.01.01-1"}
|
||||
org.testcontainers/postgresql {:mvn/version "1.19.7"}}
|
||||
org.testcontainers/postgresql {:mvn/version "1.17.6"}}
|
||||
:main-opts ["-m" "kaocha.runner" "--reporter" "kaocha.report/documentation"]}
|
||||
|
||||
:cljstyle {:extra-deps {mvxcvi/cljstyle {:mvn/version "0.16.630"
|
||||
:cljstyle {:extra-deps {mvxcvi/cljstyle {:mvn/version "0.15.0"
|
||||
:exclusions [org.clojure/clojure]}}
|
||||
:main-opts ["-m" "cljstyle.main" "check"]}}}
|
||||
|
|
|
|||
|
|
@ -4,13 +4,13 @@ This library offers two ways to access the logs of the running container: The :s
|
|||
|
||||
## String Strategy
|
||||
|
||||
The `:string` strategy sets up a function in the returned map, under the `:log` key. This function enables the
|
||||
The `:string` strategy sets up a function in the returned map, under the `string-log` key. This function enables the
|
||||
dumping of the logs when passed to the `dump-logs` function.
|
||||
|
||||
Example:
|
||||
|
||||
```clojure
|
||||
{:log-to {:log-strategy :string}}
|
||||
{:log-strategy :string}
|
||||
```
|
||||
|
||||
Then, later in your program, you can access the logs thus:
|
||||
|
|
@ -29,6 +29,6 @@ This way you can pass the container logging on to the logging library of your ch
|
|||
Example:
|
||||
|
||||
```clojure
|
||||
{:log-to {:log-strategy :fn
|
||||
:function (fn [log-line] (println "From Container: " log-line))}}
|
||||
```
|
||||
{:log-strategy :fn
|
||||
:function (fn [log-line] (println "From Container: " log-line))}
|
||||
```
|
||||
|
|
@ -89,10 +89,10 @@ atom, a fixture for Testcontainers could look like this:
|
|||
|
||||
```clojure
|
||||
(use-fixtures :once (fn [f]
|
||||
(let [pw "apassword"
|
||||
postgres (tc/start! (tc/create {:image-name "postgres:12.2"
|
||||
:exposed-ports [5432]
|
||||
:env-vars {"POSTGRES_PASSWORD" pw}}))]
|
||||
(let [{pw "apassword"
|
||||
postgres (tc/start! (tc/create {:image-name "postgres:12.2"
|
||||
:exposed-ports [5432]
|
||||
:env-vars {"POSTGRES_PASSWORD" pw}}))}]
|
||||
(my-app/initialize-db! {:dbtype "postgresql"
|
||||
:dbname "postgres"
|
||||
:user "postgres"
|
||||
|
|
|
|||
14
project.clj
14
project.clj
|
|
@ -1,4 +1,4 @@
|
|||
(defproject testcontainers-clj "unspecified"
|
||||
(defproject clj-test-containers "unspecified"
|
||||
:description "A lightweight, official wrapper around the Testcontainers Java library"
|
||||
|
||||
:url "https://github.com/testcontainers/testcontainers-clj"
|
||||
|
|
@ -7,7 +7,7 @@
|
|||
:url "http://www.eclipse.org/legal/epl-v10.html"}
|
||||
|
||||
:dependencies [[org.clojure/clojure "1.10.3"]
|
||||
[org.testcontainers/testcontainers "1.19.7"]]
|
||||
[org.testcontainers/testcontainers "1.19.0"]]
|
||||
|
||||
:aliases {"test" ["run" "-m" "kaocha.runner"]
|
||||
"cljstyle" ["run" "-m" "cljstyle.main"]}
|
||||
|
|
@ -15,15 +15,15 @@
|
|||
:plugins [[jainsahab/lein-githooks "1.0.0"]]
|
||||
|
||||
:profiles {:dev {:dependencies [[expound "0.9.0"]
|
||||
[lambdaisland/kaocha "1.88.1376"]
|
||||
[lambdaisland/kaocha "1.85.1342"]
|
||||
[lambdaisland/kaocha-cloverage "1.1.89"]
|
||||
[lambdaisland/kaocha-junit-xml "1.17.101"]
|
||||
[mvxcvi/cljstyle "0.16.630" :exclusions [org.clojure/clojure]]
|
||||
[mvxcvi/cljstyle "0.15.0" :exclusions [org.clojure/clojure]]
|
||||
[org.clojure/test.check "1.1.1"]
|
||||
[orchestra "2021.01.01-1"]
|
||||
[org.clojure/tools.namespace "1.5.0"]
|
||||
[org.testcontainers/postgresql "1.19.7"]
|
||||
[com.fzakaria/slf4j-timbre "0.4.1"]
|
||||
[org.clojure/tools.namespace "1.3.0"]
|
||||
[org.testcontainers/postgresql "1.19.0"]
|
||||
[com.fzakaria/slf4j-timbre "0.3.21"]
|
||||
[nrepl "1.0.0"]]
|
||||
:source-paths ["dev-src"]}
|
||||
:release {:deploy-repositories [["maven" {:url "https://oss.sonatype.org/service/local/staging/deploy/maven2"
|
||||
|
|
|
|||
Loading…
Reference in a new issue