Compare commits

..

2 commits

Author SHA1 Message Date
Eddú Meléndez
a7c6c306e7
Remove clojars 2023-08-24 12:01:01 -06:00
Eddú Meléndez
224aeeebbe
Add release workflow
Release workflow will deploy artifacts to `clojars` and `maven`.
2023-08-23 21:57:59 -06:00
7 changed files with 28 additions and 28 deletions

View file

@ -3,12 +3,12 @@ description: Sets up Build
runs: runs:
using: "composite" using: "composite"
steps: steps:
- uses: actions/setup-java@v4 - uses: actions/setup-java@v3
with: with:
java-version: '8' java-version: '8'
distribution: temurin distribution: temurin
- name: Cache dependencies - name: Cache dependencies
uses: actions/cache@v4 uses: actions/cache@v3
with: with:
path: ~/.m2/repository path: ~/.m2/repository
key: ${{ runner.os }}-lein-${{ hashFiles('**/project.clj') }} key: ${{ runner.os }}-lein-${{ hashFiles('**/project.clj') }}

View file

@ -2,9 +2,9 @@ name: Clojure CI
on: on:
push: push:
branches: [ main ] branches: [ master ]
pull_request: pull_request:
branches: [ main ] branches: [ master ]
permissions: permissions:
contents: read contents: read
@ -13,7 +13,7 @@ jobs:
build: build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v3
- name: Setup Build - name: Setup Build
uses: ./.github/actions/setup-build uses: ./.github/actions/setup-build
- name: Install dependencies - name: Install dependencies

View file

@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout Code - name: Checkout Code
uses: actions/checkout@v4 uses: actions/checkout@v3
with: with:
fetch-depth: 0 fetch-depth: 0
- name: Setup Build - name: Setup Build

View file

@ -1,27 +1,27 @@
{:paths ["src" "resources"] {:paths ["src" "resources"]
:deps {org.clojure/clojure {:mvn/version "1.10.3"} :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"} :aliases {:dev {:extra-paths "dev-src"}
:test {:extra-paths ["test" "test/resources"] :test {:extra-paths ["test" "test/resources"]
:extra-deps {expound/expound {:mvn/version "0.9.0"} :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-cloverage {:mvn/version "1.1.89"}
lambdaisland/kaocha-junit-xml {:mvn/version "1.17.101"} lambdaisland/kaocha-junit-xml {:mvn/version "1.17.101"}
org.clojure/test.check {:mvn/version "1.1.1"} 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"] :test-runner {:extra-paths ["test" "test/resources"]
:extra-deps {expound/expound {:mvn/version "0.9.0"} :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-cloverage {:mvn/version "1.1.89"}
lambdaisland/kaocha-junit-xml {:mvn/version "1.17.101"} lambdaisland/kaocha-junit-xml {:mvn/version "1.17.101"}
org.clojure/test.check {:mvn/version "1.1.1"} org.clojure/test.check {:mvn/version "1.1.1"}
orchestra {:mvn/version "2021.01.01-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"]} :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]}} :exclusions [org.clojure/clojure]}}
:main-opts ["-m" "cljstyle.main" "check"]}}} :main-opts ["-m" "cljstyle.main" "check"]}}}

View file

@ -4,13 +4,13 @@ This library offers two ways to access the logs of the running container: The :s
## String Strategy ## 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. dumping of the logs when passed to the `dump-logs` function.
Example: Example:
```clojure ```clojure
{:log-to {:log-strategy :string}} {:log-strategy :string}
``` ```
Then, later in your program, you can access the logs thus: 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: Example:
```clojure ```clojure
{:log-to {:log-strategy :fn {:log-strategy :fn
:function (fn [log-line] (println "From Container: " log-line))}} :function (fn [log-line] (println "From Container: " log-line))}
``` ```

View file

@ -89,10 +89,10 @@ atom, a fixture for Testcontainers could look like this:
```clojure ```clojure
(use-fixtures :once (fn [f] (use-fixtures :once (fn [f]
(let [pw "apassword" (let [{pw "apassword"
postgres (tc/start! (tc/create {:image-name "postgres:12.2" postgres (tc/start! (tc/create {:image-name "postgres:12.2"
:exposed-ports [5432] :exposed-ports [5432]
:env-vars {"POSTGRES_PASSWORD" pw}}))] :env-vars {"POSTGRES_PASSWORD" pw}}))}]
(my-app/initialize-db! {:dbtype "postgresql" (my-app/initialize-db! {:dbtype "postgresql"
:dbname "postgres" :dbname "postgres"
:user "postgres" :user "postgres"

View file

@ -1,4 +1,4 @@
(defproject testcontainers-clj "unspecified" (defproject clj-test-containers "unspecified"
:description "A lightweight, official wrapper around the Testcontainers Java library" :description "A lightweight, official wrapper around the Testcontainers Java library"
:url "https://github.com/testcontainers/testcontainers-clj" :url "https://github.com/testcontainers/testcontainers-clj"
@ -7,7 +7,7 @@
:url "http://www.eclipse.org/legal/epl-v10.html"} :url "http://www.eclipse.org/legal/epl-v10.html"}
:dependencies [[org.clojure/clojure "1.10.3"] :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"] :aliases {"test" ["run" "-m" "kaocha.runner"]
"cljstyle" ["run" "-m" "cljstyle.main"]} "cljstyle" ["run" "-m" "cljstyle.main"]}
@ -15,15 +15,15 @@
:plugins [[jainsahab/lein-githooks "1.0.0"]] :plugins [[jainsahab/lein-githooks "1.0.0"]]
:profiles {:dev {:dependencies [[expound "0.9.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-cloverage "1.1.89"]
[lambdaisland/kaocha-junit-xml "1.17.101"] [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"] [org.clojure/test.check "1.1.1"]
[orchestra "2021.01.01-1"] [orchestra "2021.01.01-1"]
[org.clojure/tools.namespace "1.5.0"] [org.clojure/tools.namespace "1.3.0"]
[org.testcontainers/postgresql "1.19.7"] [org.testcontainers/postgresql "1.19.0"]
[com.fzakaria/slf4j-timbre "0.4.1"] [com.fzakaria/slf4j-timbre "0.3.21"]
[nrepl "1.0.0"]] [nrepl "1.0.0"]]
:source-paths ["dev-src"]} :source-paths ["dev-src"]}
:release {:deploy-repositories [["maven" {:url "https://oss.sonatype.org/service/local/staging/deploy/maven2" :release {:deploy-repositories [["maven" {:url "https://oss.sonatype.org/service/local/staging/deploy/maven2"