Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
camsaul committed Apr 15, 2020
0 parents commit f64ec4a
Show file tree
Hide file tree
Showing 14 changed files with 1,689 additions and 0 deletions.
154 changes: 154 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,154 @@
version: 2.1

########################################################################################################################
# EXECUTORS #
########################################################################################################################

executors:
default:
working_directory: /home/circleci/metabase/second-date/
docker:
- image: circleci/clojure:lein-2.9.1

java-11:
working_directory: /home/circleci/metabase/second-date/
docker:
- image: circleci/clojure:openjdk-11-lein-2.9.1


########################################################################################################################
# COMMANDS #
########################################################################################################################

commands:

attach-workspace:
steps:
- attach_workspace:
at: /home/circleci/

restore-deps-cache:
steps:
- restore_cache:
keys:
- deps-{{ checksum "project.clj" }}
- deps-

jobs:

checkout:
executor: default
steps:
- restore_cache:
keys:
- source-{{ .Branch }}-{{ .Revision }}
- source-{{ .Branch }}
- source-
- checkout
- save_cache:
key: source-{{ .Branch }}-{{ .Revision }}
paths:
- .git
- persist_to_workspace:
root: /home/circleci/
paths:
- metabase/second-date

deps:
executor: default
steps:
- attach-workspace
- restore-deps-cache
- run: lein deps
- save_cache:
key: deps-{{ checksum "project.clj" }}
paths:
- /home/circleci/.m2

lein:
parameters:
e:
type: executor
default: default
lein-command:
type: string
executor: << parameters.e >>
steps:
- attach-workspace
- restore-deps-cache
- run:
command: lein << parameters.lein-command >>
no_output_timeout: 5m


########################################################################################################################
# WORKFLOWS #
########################################################################################################################

workflows:
version: 2
build:
jobs:
- checkout

- deps:
requires:
- checkout

- lein:
name: tests
requires:
- deps
lein-command: test

- lein:
name: tests-java-11
requires:
- deps
e: java-11
lein-command: test

- lein:
name: eastwood
requires:
- deps
lein-command: eastwood

- lein:
name: docstring-checker
requires:
- deps
lein-command: docstring-checker

- lein:
name: namespace-decls
requires:
- deps
lein-command: check-namespace-decls

- lein:
name: bikeshed
requires:
- deps
lein-command: bikeshed

- lein:
name: yagni
requires:
- deps
lein-command: yagni

- lein:
name: deploy
requires:
- bikeshed
- docstring-checker
- eastwood
- namespace-decls
- yagni
- tests
- tests-java-11
lein-command: deploy clojars
filters:
branches:
only: master
22 changes: 22 additions & 0 deletions .dir-locals.el
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
((nil . ((indent-tabs-mode . nil) ; always use spaces for tabs
(require-final-newline . t))) ; add final newline on save
(clojure-mode . ((eval . (progn
;; Specify which arg is the docstring for certain macros
;; (Add more as needed)
(put 's/defn 'clojure-doc-string-elt 2)
(put 'p.types/defprotocol+ 'clojure-doc-string-elt 2)

;; Define custom indentation for functions inside metabase.
;; This list isn't complete; add more forms as we come across them.
(define-clojure-indent
(p.types/defprotocol+ '(1 (:defn)))
(p.types/defrecord+ '(2 nil nil (:defn)))
(insert! 1)
(transaction 2))))
;; if you're using clj-refactor (highly recommended!), prefer prefix notation when cleaning the ns
;; form
(cljr-favor-prefix-notation . nil)
;; prefer keeping source width about ~118, GitHub seems to cut off stuff at either 119 or 120 and
;; it's nicer to look at code in GH when you don't have to scroll back and forth
(fill-column . 118)
(clojure-docstring-fill-column . 118))))
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.* @metabase
26 changes: 26 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
*.class
*.jar
.\#*
/*.iml
/.eastwood
/.env
/.envrc
/.idea
/.lein-deps-sum
/.lein-env
/.lein-failures
/.lein-plugins
/.lein-repl-history
/.nrepl-port
/build.xml
/checkouts
/classes
/classes
/config.edn
/lib
/pom.xml
/pom.xml.asc
/profiles.clj
/tags
/target
\#*\#
Loading

0 comments on commit f64ec4a

Please sign in to comment.