Skip to content

Commit

Permalink
Update circleci to use deps
Browse files Browse the repository at this point in the history
  • Loading branch information
tobias committed Aug 19, 2023
1 parent a1fa61d commit 831307f
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 13 deletions.
22 changes: 10 additions & 12 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: 2.0
jobs:
build:
docker:
- image: clojure:openjdk-17-lein-buster
- image: clojure:temurin-17-tools-deps-bullseye
environment:
- DB_PORT: 5432
- CLOJARS_ENVIRONMENT: test
Expand All @@ -21,25 +21,23 @@ jobs:
- checkout
- restore_cache:
keys:
- clojars-{{ checksum "project.clj" }}
- run: lein deps
- clojars-{{ checksum "deps.edn" }}
- run: make prep-deps
- save_cache:
paths:
- $HOME/.m2
- $HOME/.lein
key: clojars-{{ checksum "project.clj" }}
key: clojars-{{ checksum "deps.edn" }}
# Install some tooling we need that isn't on the image by default
- run: apt update && apt install curl && apt install unzip
- run:
name: Download ElasticMQ
command: wget https://s3-eu-west-1.amazonaws.com/softwaremill-public/elasticmq-server-1.4.2.jar -O elasticmq.jar
command: curl https://s3-eu-west-1.amazonaws.com/softwaremill-public/elasticmq-server-1.4.2.jar -o elasticmq.jar
- run:
name: Run ElasticMQ
command: java -Dconfig.file=dev-resources/elasticmq.conf -jar elasticmq.jar
background: true
- run: lein do run -m user/migrate, test, uberjar
- run: ./bin/clj-kondo --lint src test
- run: make migrate-db
- run: make lint
- run: make test
- store_test_results:
path: target/test-results
- run: mv target/uberjar/clojars-web-*-standalone.jar clojars-uberjar.jar
- store_artifacts:
path: clojars-uberjar.jar
destination: uberjar
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ migrate-db:
nvd-check:
./bin/nvd-check

.PHONY: prep-deps
prep-deps:
clojure -A:defaults -X:deps prep

.PHONY: test
test:
./bin/kaocha
2 changes: 1 addition & 1 deletion resources/config.edn
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
:dbname "clojars"
:host #profile {:production #ssm-parameter "/clojars/production/db_host"
:default "localhost"}
:port #profile {:default 55432
:port #profile {:default #or [#env DB_PORT 55432]
:test #or [#env DB_PORT 55433]
:production 5432}
:user #profile {:production #ssm-parameter "/clojars/production/db_user"
Expand Down

0 comments on commit 831307f

Please sign in to comment.