-
-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
52 additions
and
88 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: Setup Clojure | ||
inputs: | ||
clojure-version: | ||
required: true | ||
default: "1.11.4" | ||
java-version: | ||
required: true | ||
default: "17" | ||
cache-key: | ||
required: true | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- name: Prepare JDK | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: ${{ inputs.java-version }} | ||
distribution: 'temurin' | ||
- name: Setup Clojure | ||
uses: DeLaGuardo/[email protected] | ||
with: | ||
cli: ${{ inputs.clojure-version }} | ||
- name: Restore cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: | | ||
~/.m2/repository | ||
~/.gitlibs | ||
~/.deps.clj | ||
key: v1-${{ hashFiles('./deps.edn') }}-${{ inputs.cache-key }} | ||
restore-keys: | | ||
v1-${{ hashFiles('./deps.edn') }}- | ||
v1- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,23 +13,10 @@ jobs: | |
- uses: actions/[email protected] | ||
with: | ||
fetch-depth: 0 | ||
- name: Prepare JDK 17 | ||
uses: actions/setup-java@v3 | ||
- name: Setup Java & Clojure | ||
uses: ./.github/actions/setup-clojure | ||
with: | ||
java-version: 17 | ||
distribution: 'temurin' | ||
- name: Setup Clojure | ||
uses: DeLaGuardo/[email protected] | ||
with: | ||
cli: 1.11.1.1413 | ||
- name: Restore cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: | | ||
~/.m2/repository | ||
~/.gitlibs | ||
~/.deps.clj | ||
key: deploy | ||
cache-key: deploy | ||
- name: Build JAR | ||
run: clojure -T:build build | ||
env: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,15 +15,10 @@ jobs: | |
DOWNLOAD_URL: https://github.com/clj-kondo/clj-kondo/releases/download | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Prepare JDK 17 | ||
uses: actions/setup-java@v3 | ||
- name: Setup Java & Clojure | ||
uses: ./.github/actions/setup-clojure | ||
with: | ||
java-version: 17 | ||
distribution: 'temurin' | ||
- name: Setup Clojure | ||
uses: DeLaGuardo/[email protected] | ||
with: | ||
cli: 1.11.1.1155 | ||
cache-key: kondo | ||
- name: Install clj-kondo | ||
run: | | ||
curl -OL ${DOWNLOAD_URL}/v${CLJ_KONDO_VERSION}/clj-kondo-${CLJ_KONDO_VERSION}-linux-static-amd64.zip | ||
|
@@ -52,23 +47,10 @@ jobs: | |
timeout-minutes: 10 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Prepare JDK 17 | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: 17 | ||
distribution: 'temurin' | ||
- name: Setup Clojure | ||
uses: DeLaGuardo/[email protected] | ||
with: | ||
cli: 1.11.1.1155 | ||
- name: Restore cache | ||
uses: actions/cache@v3 | ||
- name: Setup Java & Clojure | ||
uses: ./.github/actions/setup-clojure | ||
with: | ||
path: | | ||
~/.m2/repository | ||
~/.gitlibs | ||
~/.deps.clj | ||
key: tests-postgres | ||
cache-key: tests | ||
- run: clojure -X:dev:test | ||
name: Run tests | ||
env: | ||
|
@@ -78,71 +60,32 @@ jobs: | |
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Prepare JDK 17 | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: 17 | ||
distribution: 'temurin' | ||
- name: Setup Clojure | ||
uses: DeLaGuardo/[email protected] | ||
with: | ||
cli: 1.11.1.1155 | ||
- name: Restore cache | ||
uses: actions/cache@v3 | ||
- name: Setup Java & Clojure | ||
uses: ./.github/actions/setup-clojure | ||
with: | ||
path: | | ||
~/.m2/repository | ||
~/.gitlibs | ||
~/.deps.clj | ||
key: whitespace-linter | ||
cache-key: whitespace-linter | ||
- run: clojure -T:whitespace-linter | ||
name: Run whitespace linter | ||
|
||
check: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Prepare JDK 17 | ||
uses: actions/setup-java@v3 | ||
- name: Setup Java & Clojure | ||
uses: ./.github/actions/setup-clojure | ||
with: | ||
java-version: 17 | ||
distribution: 'temurin' | ||
- name: Setup Clojure | ||
uses: DeLaGuardo/[email protected] | ||
with: | ||
cli: 1.11.1.1155 | ||
- name: Restore cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: | | ||
~/.m2/repository | ||
~/.gitlibs | ||
~/.deps.clj | ||
key: check | ||
cache-key: check | ||
- run: clojure -M:check | ||
name: Check namespaces | ||
|
||
codecov: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Prepare JDK 17 | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: 17 | ||
distribution: 'temurin' | ||
- name: Setup Clojure | ||
uses: DeLaGuardo/[email protected] | ||
with: | ||
cli: 1.11.1.1155 | ||
- name: Restore cache | ||
uses: actions/cache@v3 | ||
- name: Setup Java & Clojure | ||
uses: ./.github/actions/setup-clojure | ||
with: | ||
path: | | ||
~/.m2/repository | ||
~/.gitlibs | ||
~/.deps.clj | ||
key: codecov | ||
cache-key: codecov | ||
- run: clojure -X:dev:test-h2:cloverage | ||
name: Run tests with Cloverage | ||
- name: Upload results to codecov.io | ||
|