Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: tests
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Chez Scheme
run: |
sudo apt-get update && sudo apt-get install -y chezscheme
if ! command -v chez >/dev/null 2>&1; then
printf '#!/bin/sh\nexec scheme "$@"\n' | sudo tee /usr/local/bin/chez >/dev/null
sudo chmod +x /usr/local/bin/chez
fi
- name: Get jolt
run: git clone --depth 1 --recurse-submodules https://github.com/jolt-lang/jolt.git "$HOME/jolt"
- name: Test
run: JOLT_PWD="$PWD" "$HOME/jolt/bin/joltc" -M:test
6 changes: 3 additions & 3 deletions deps.edn
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{:paths ["src"]

;; Load with JOLT_FEATURES including "clj" so reitit-core reads its :clj
;; branches (this adapter mirrors reitit's reitit.Trie Java class). reitit-core
;; This adapter mirrors reitit's reitit.Trie Java class so reitit-core's :clj
;; branches resolve (:clj is one of jolt's default reader features). reitit-core
;; and its meta-merge dep are pulled by consumers; declared here for tests.
:deps {metosin/reitit-core {:git/url "https://github.com/metosin/reitit"
:git/sha "5d5c965deb3c7c8d64b8dd636432eaa14f0324ec"
Expand All @@ -12,4 +12,4 @@
:aliases {:test {:extra-paths ["test"]
:main-opts ["-m" "reitit.trie-jolt-test"]}}

:tasks {test "JOLT_FEATURES=clj,jolt,default jolt-deps -M:test"}}
:tasks {test "joltc -M:test"}}
2 changes: 1 addition & 1 deletion test/reitit/trie_jolt_test.clj
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,5 @@
(check "url-decoded param" {:id "a b"}
(-> (r/match-by-path router "/api/users/a%20b") :path-params)))
(if (pos? @failures)
(do (println @failures "failing check(s)") (janet.os/exit 1))
(throw (ex-info "test failures" {:n @failures}))
(println "all checks passed")))
Loading