Commit graph

81 commits

Author SHA1 Message Date
Sean Corfield
60c1549168
dev/test/ci deps updates
Signed-off-by: Sean Corfield <sean@corfield.org>
2024-09-22 18:02:38 -07:00
Sean Corfield
7fceefbe5c
update test deps to 1.12.0
Signed-off-by: Sean Corfield <sean@corfield.org>
2024-09-05 22:43:45 -07:00
Sean Corfield
bf34a23e68
fixes #537 by sanitizing metadata while expanding support to numbers
Signed-off-by: Sean Corfield <sean@corfield.org>
2024-08-28 18:50:25 -07:00
Sean Corfield
ae62d2b474
clojure 1.11.4 & 1.12.0 rc 1
Signed-off-by: Sean Corfield <sean@corfield.org>
2024-08-03 12:33:16 -07:00
Sean Corfield
bb72885027
update clojure test version
Signed-off-by: Sean Corfield <sean@corfield.org>
2024-07-23 22:24:37 -07:00
Sean Corfield
6c2d8de53f
update java test matrix
Signed-off-by: Sean Corfield <sean@corfield.org>
2024-06-12 23:06:43 -07:00
Sean Corfield
1b7ade9317
clojure 1.12 alpha 12
Signed-off-by: Sean Corfield <sean@corfield.org>
2024-05-23 19:29:07 -07:00
Sean Corfield
8764759323
update dev deps
Signed-off-by: Sean Corfield <sean@corfield.org>
2024-05-06 19:44:56 -07:00
Sean Corfield
508158112d
update dev/test dependencies
Signed-off-by: Sean Corfield <sean@corfield.org>
2024-04-06 19:16:45 -07:00
Sean Corfield
bffcc67fa4
update clojure
Signed-off-by: Sean Corfield <sean@corfield.org>
2024-03-08 09:29:58 -08:00
Sean Corfield
fc983927ce
test against 1.12
Signed-off-by: Sean Corfield <sean@corfield.org>
2024-02-09 22:41:55 -08:00
Sean Corfield
8334978a43 update tools.build; drop template pom.xml 2023-10-06 15:11:43 -07:00
Sean Corfield
2c463ec517 bump to tools.build 0.9.5 2023-08-11 10:50:54 -07:00
Sean Corfield
3ec884f881 update dev/test dependencies 2023-06-16 20:31:05 -07:00
Sean Corfield
6748d86dae update test/deploy deps 2023-04-15 15:29:43 -07:00
Sean Corfield
c8d4f58f0d bump tools.build 2023-04-15 11:31:12 -07:00
Sean Corfield
3910df215a split test/runner to make project more jack-in friendly 2023-04-15 11:29:08 -07:00
Sean Corfield
6ab8c6452b drop use of build-clj 2023-01-23 23:29:52 -08:00
Sean Corfield
83ad5cff74 fx #447 by updating deps/actions 2023-01-14 14:18:03 -08:00
Sean Corfield
fb1decbd1e fixes #409 by making the check conditional 2022-05-20 10:46:04 -07:00
Sean Corfield
ccaf29292a CI change for Clojure 1.11 release 2022-03-25 21:47:30 -07:00
Sean Corfield
4823ec8694 update build-clj 2022-03-06 12:09:46 -08:00
Sean Corfield
826407e9db first pass of caching formatter
needs more documentation.

Initial results suggest a speedup for simple queries of 2-3x.
Complex queries can see up to 20x speedup.
2022-01-08 00:41:21 -08:00
Sean Corfield
8976379fa6 update build-clj 2022-01-06 20:30:09 -08:00
Sean Corfield
0867ce54dc update build-clj 2022-01-04 14:00:41 -08:00
Sean Corfield
8979e938f3 fixes #374 2021-12-23 13:32:47 -08:00
Sean Corfield
aa8089524b update build/test dependencies 2021-12-13 10:50:29 -08:00
Sean Corfield
dc37852024 fix #372 2021-12-02 15:20:03 -08:00
Sean Corfield
627bc25357 retire CircleCI; update build-clj 2021-11-26 22:06:16 -08:00
Sean Corfield
ceabd49508 bump deps 2021-10-16 22:43:43 -07:00
Sean Corfield
3d0a9ba79c fixes #367 2021-10-03 21:59:11 -07:00
Sean Corfield
e44a30a7fd fixes #364 2021-09-25 16:32:00 -07:00
Sean Corfield
871908d5c9 update build-clj dep 2021-08-31 14:57:12 -07:00
lread
68a63b7078 Merge remote-tracking branch 'upstream/develop' into lread-issue-290
* upstream/develop:
  update eastwood etc
  add distribution (jdk)
  add maven cache to GH Actions
2021-08-30 22:07:08 -04:00
Sean Corfield
17881ef2b4 update eastwood etc 2021-08-30 18:47:10 -07:00
lread
ae29147a22 PR review feedback: move gen-doc-tests build code
Move the code that generates doc tests out from build.clj
to its own source runnable via main.

This isolates gen-doc-tests work to its own process
during the build.

I arbitrarily:
- chose 'build' as the folder for build helper sources
- namespaced our first build helper under 'honey.gen-doc-tests'
2021-08-30 21:08:28 -04:00
lread
cccd3e96fd Doc block testing now understands refer-clojure
Test-doc-blocks added support for this feature
2021-08-30 17:40:25 -04:00
lread
4eb9eca147 Merge remote-tracking branch 'upstream/develop' into lread-issue-290
Adapt to build changes.

* upstream/develop:
  Switch to build-clj lib
2021-08-28 17:14:04 -04:00
Sean Corfield
c81d27a224 Switch to build-clj lib 2021-08-27 22:51:49 -07:00
lread
35c5aee584 Test code blocks in docs with test-doc-blocks
Resolves #290

**Build**

New commands:
- `gen-doc-tests` - only regenerates tests if stale,
   use `clean` command to force regen
- `run-doc-tests` - calls gen-doc-tests then runs tests,
  accepts the same parameters as run-tests.
  Can specify `:platform`
    - `:cljs` - run tests under ClojureScript
    - otherwise Clojure where we can specify one of: `:1.9`
    `:1.10` `:master`

I'm not sure if my use of the `:platform` parameter jives with
your `:aliases` parameter used for `run-tests`.
Can adjust if you like.

Example usages:
```shell
clojure -T:build gen-doc-tests

clojure -T:build run-doc-tests :platform :cljs

clojure -T:build run-doc-tests

clojure -T:build run-doc-tests :platform :1.10
```

The `ci` command has been updated to generate and run doc tests for same
platforms as unit tests.

**Articles**

In addition to `README.md`, now testing doc blocks in all articles
under `doc` dir excepting `doc/operator-reference.md` which does not
have any runnable code blocks.

**Skipped**

Any code block that is intentionally not runnable has been marked to be
skipped via: `<!-- :test-doc-blocks/skip -->`.

**Consistency**

I noticed that some code blocks use REPL syntax:
```Clojure
user=> (+ 1 2 3)
6
```
and others use editor syntax:
```Clojure
(+ 1 2 3)
;;=> 6
```
some places also omit the comment for editor style:
```Clojure
(+ 1 2 3)
=> 6
```
All of this is just fine with test-doc-blocks.
I left the inconsistency as is, but can make a pass for consistency upon
request.

**HoneySQL state**

I noticed a code block that set the sql dialect was affecting other
tests. I simply restored the dialect to the default at the end of the
code block.

**Un-tweaked output**

Some code blocks had string output hand-tweaked for readability.
These have been adjusted to instead use `sql/format`'s `:pretty` option.
In some cases the output is not as readable as the hand-tweaked version.
I humbly suggest that perhaps `:pretty` output could perhaps be
improved (instead of having test-doc-blocks somehow adapt).

**Corrections**

There were very few code blocks that required fixing due to incorrect
output/code.  Please review the diffs carefully to make sure all is as
expected.

**refer-clojure :excludes**

Not currently supported for test-doc-blocks, not a real issue for
Clojure, we'll see warnings under Clojure, but that's probably ok.

But I might actually need it for ClojureScript.
I was finding that `for` did not get overridden by our helper
`:refer` in CloureScript.

Will add proper support to test-doc-blocks but in the short-term,
will use `h/for`.

**ns requires adjustments**

Any specific case of `(ns my-ns (require [my-require :as a]))` is now
the REPL friendly `(require '[my-require :as a])`

Any missing required `requires` were added.

The HoneySQL docs seem to encourage the use of referred vars for
helpers. Although this has the con of overlaps with Clojure core vars,
it is also convenient for Clojure when using `:refer :all`.

**ClojureScript :refer**

ClojureScript does not support `:refer :all` and each var must be
specified in place of `:all`.

I have adjusted examples accordingly to work with both Clojure and
ClojureScript.
2021-08-27 18:39:07 -04:00
Sean Corfield
584cd1c711 update tools.build; add deploy via build 2021-08-22 19:30:04 -07:00
Sean Corfield
eac5e933c3 Fix runner/build/gitpod REPL 2021-08-17 22:39:07 -07:00
Sean Corfield
68a1ccfa3c Bump tools.build; write scm>tag 2021-08-13 16:10:45 -07:00
Sean Corfield
68eafc0c2e clean up :deploy 2021-08-12 19:43:16 -07:00
Sean Corfield
5191abaa6c switch to tools.build 2021-08-12 19:20:02 -07:00
Sean Corfield
964f9837b0 version bumps 2021-07-29 23:00:02 -07:00
Sean Corfield
a393cd89e2 fixes #337 by using clojure.test for cljs 2021-07-15 19:26:59 -07:00
Sean Corfield
8ec08ca686 Addresses #331 by changing some CI stuff
* Updated Eastwood to 0.5.1
* Added set -Eeo pipefail to run-tests.sh (I don't like -x)
* Run CI on PR
* Add shellcheck to steps

I'm not going to run Eastwood on tests at this point (see my
comments in #334 for reasons).
2021-06-21 15:16:18 -07:00
Sean Corfield
3b00d5c3e6 bump :test-runner 2021-06-16 22:35:53 -07:00
Sean Corfield
0ab991d856 drop :runner now we use -X 2021-06-16 18:25:59 -07:00