Skip to content

Commit

Permalink
sort output
Browse files Browse the repository at this point in the history
  • Loading branch information
namenu committed Jun 14, 2024
1 parent a58e383 commit 1465250
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 7 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Test

on: [push, pull_request]

jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- uses: actions/setup-java@v4
with:
java-version: '17'

- name: Install clojure tools
uses: DeLaGuardo/setup-clojure@12.5
with:
cli: 1.11.1.1182

- name: Test
run: clojure -X:test
5 changes: 4 additions & 1 deletion deps.edn
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,7 @@
:extra-deps {org.clojure/tools.deps.cli {:mvn/version "0.10.55"}}
:ns-default clojure.tools.deps.cli.api}
:test {:extra-paths ["test" "test-resources"]
:extra-deps {org.clojure/test.check {:mvn/version "1.1.1"}}}}}
:extra-deps {io.github.cognitect-labs/test-runner
{:git/tag "v0.5.1" :git/sha "dfb30dd"}}
:main-opts ["-m" "cognitect.test-runner"]
:exec-fn cognitect.test-runner.api/test}}}
6 changes: 3 additions & 3 deletions src/namenu/deps_diff/core.clj
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,6 @@
modified (map (fn [k] [k {:from (get deps-from k)
:to (get deps-to k)}])
modified-keys)]
{:removed (into {} removed)
:added (into {} added)
:modified (into {} modified)}))
{:removed (into (sorted-map) removed)
:added (into (sorted-map) added)
:modified (into (sorted-map) modified)}))
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(ns namenu.deps-diff.test
(ns namenu.deps-diff.core-test
(:require [clojure.spec.alpha :as s]
[clojure.test :refer [deftest testing is]]
[namenu.deps-diff.core :refer [diff* parse-resolved-tree]]
Expand All @@ -17,7 +17,7 @@
(testing "aliases"
(let [d (diff* base target)]
(is (= (update-vals d count)
{:removed 1, :added 11, :modified 31}))))
{:removed 0, :added 0, :modified 6}))))

(testing "local/root test"
(let [d (diff* base target)]
Expand All @@ -38,4 +38,8 @@
:paths ["/Users/namenu/.gitlibs/libs/superlifter/superlifter/e0df5b36b496c485c75f38052a71b18f02772cc0/src"]}
))))))

(clojure.test/run-tests)
(comment
(diff-test)
(make-ver-test)
)

0 comments on commit 1465250

Please sign in to comment.