Skip to content

Commit

Permalink
Create separate workflows for different action types
Browse files Browse the repository at this point in the history
  • Loading branch information
jvia committed Jan 11, 2024
1 parent 6eb20fb commit e2dc71b
Show file tree
Hide file tree
Showing 5 changed files with 93 additions and 41 deletions.
3 changes: 3 additions & 0 deletions .cljfmt.edn
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{:extra-indents
{facts [[:block 1]]
fact [[:block 1]]}}
12 changes: 7 additions & 5 deletions .github/workflows/ci.yml → .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
name: Clojure CI
name: pull_request

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

Expand All @@ -11,7 +9,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install dependencies
- name: deps
run: lein deps
- name: Run tests
- name: lint
run: lein clj-kondo --lint src test
- name: cljfmt
run: lein cljfmt check
- name: test
run: lein test
20 changes: 20 additions & 0 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: push

on:
push:
branches:
- main

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: deps
run: lein deps
- name: lint
run: lein clj-kondo --lint src test
- name: cljfmt
run: lein cljfmt check
- name: test
run: lein test
20 changes: 20 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: release

on:
push:
branches:
- main

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: deps
run: lein deps
- name: lint
run: lein clj-kondo --lint src test
- name: cljfmt
run: lein cljfmt check
- name: test
run: lein test
79 changes: 43 additions & 36 deletions project.clj
Original file line number Diff line number Diff line change
@@ -1,50 +1,57 @@
(defproject com.nytimes/querqy-clj "0.7.1-SNAPSHOT"
:description "Querqy in Clojure"
:url "https://github.com/nytimes/querqy-clj"

:license {:name "Apache License",
:url "http://www.apache.org/licenses/LICENSE-2.0"}

:repositories [["releases" {:url "https://clojars.org/repo"
:sign-releases false
:username [:env/clojars_username]
:password [:env/clojars_password]}]
["snapshots" {:url "https://clojars.org/repo"
:sign-releases false
:username [:env/clojars_username]
:password [:env/clojars_password]}]]

:plugins [[com.github.clj-kondo/lein-clj-kondo "0.2.1"]
[lein-cljfmt "0.8.0"]]

:dependencies [[org.clojure/clojure "1.11.1"]
[org.clojure/tools.logging "1.2.4"]
[org.querqy/querqy-core "3.12.0"]]
:repositories
[["releases" {:url "https://clojars.org/repo"
:sign-releases false
:username [:env/clojars_username]
:password [:env/clojars_password]}]
["snapshots" {:url "https://clojars.org/repo"
:sign-releases false
:username [:env/clojars_username]
:password [:env/clojars_password]}]]

:plugins
[[com.github.clj-kondo/lein-clj-kondo "2023.10.20"]
[dev.weavejester/lein-cljfmt "0.11.2"]]

:dependencies
[[org.clojure/clojure "1.11.1"]
[org.clojure/tools.logging "1.2.4"]
[org.querqy/querqy-core "3.12.0"]]

:repl-options {:init-ns com.nytimes.querqy}
:global-vars {*warn-on-reflection* true}

:test-selectors {:default (complement :integration)
:unit (complement :integration)
:integration :integration}
:global-vars {*warn-on-reflection* true}

:profiles {:dev {:source-paths ["dev"]
:jvm-opts ["-Dorg.slf4j.simpleLogger.defaultLogLevel=debug"]
:dependencies [[metosin/testit "0.4.1"]
[lambdaisland/kaocha "1.66.1034"]
[org.clojure/test.check "1.1.1"]
[criterium "0.4.6"]
[org.slf4j/slf4j-api "1.7.36"]
[org.slf4j/slf4j-simple "1.7.36"]]}}
:test-selectors
{:default (complement :integration)
:unit (complement :integration)
:integration :integration}

:profiles
{:dev {:source-paths ["dev"]
:jvm-opts ["-Dorg.slf4j.simpleLogger.defaultLogLevel=debug"]
:dependencies [[metosin/testit "0.4.1"]
[lambdaisland/kaocha "1.66.1034"]
[org.clojure/test.check "1.1.1"]
[criterium "0.4.6"]
[org.slf4j/slf4j-api "1.7.36"]
[org.slf4j/slf4j-simple "1.7.36"]]}}

:aliases {"kaocha" ["run" "-m" "kaocha.runner"]}

:cljfmt {:indents {facts [[:block 1]]
fact [[:block 1]]}}
:cljfmt {:load-config-file? true}

:release-tasks [["vcs" "assert-committed"]
["change" "version" "leiningen.release/bump-version" "release"]
["vcs" "commit"]
["vcs" "tag" "--no-sign"]
["change" "version" "leiningen.release/bump-version"]
["vcs" "commit"]
["vcs" "push"]])
:release-tasks
[["vcs" "assert-committed"]
["change" "version" "leiningen.release/bump-version" "release"]
["vcs" "commit"]
["vcs" "tag" "--no-sign"]
["change" "version" "leiningen.release/bump-version"]
["vcs" "commit"]
["vcs" "push"]])

0 comments on commit e2dc71b

Please sign in to comment.