-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improved test partitioning: keep namespaces grouped together and don'…
…t sort tests (#31) * Improved test partitioning * Update dox * Code cleanup * Modernize GH Actions * Appease Kondo
- Loading branch information
Showing
9 changed files
with
319 additions
and
173 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.1.1413" | ||
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 |
---|---|---|
|
@@ -10,35 +10,18 @@ jobs: | |
runs-on: ubuntu-20.04 | ||
environment: Deployment | ||
steps: | ||
- uses: actions/[email protected] | ||
with: | ||
fetch-depth: 0 | ||
- 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.1413 | ||
- name: Restore cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: | | ||
~/.m2/repository | ||
~/.gitlibs | ||
~/.deps.clj | ||
key: v1-${{ hashFiles('./deps.edn') }}-deploy | ||
restore-keys: | | ||
v1-${{ hashFiles('./deps.edn') }}- | ||
v1- | ||
- name: Build Hawk | ||
run: clojure -T:build jar | ||
env: | ||
GITHUB_SHA: ${{ env.GITHUB_SHA }} | ||
- name: Deploy Hawk | ||
run: clojure -T:build deploy | ||
env: | ||
CLOJARS_USERNAME: ${{ secrets.CLOJARS_USERNAME }} | ||
CLOJARS_PASSWORD: ${{ secrets.CLOJARS_PASSWORD }} | ||
- uses: actions/[email protected] | ||
- uses: ./.github/actions/setup | ||
with: | ||
cache-key: deploy | ||
- name: Build Hawk | ||
run: >- | ||
clojure -T:build jar | ||
env: | ||
GITHUB_SHA: ${{ env.GITHUB_SHA }} | ||
- name: Deploy Hawk | ||
run: >- | ||
clojure -T:build deploy | ||
env: | ||
CLOJARS_USERNAME: ${{ secrets.CLOJARS_USERNAME }} | ||
CLOJARS_PASSWORD: ${{ secrets.CLOJARS_PASSWORD }} |
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 |
---|---|---|
|
@@ -2,62 +2,33 @@ name: Tests | |
|
||
on: | ||
push: | ||
workflow_dispatch: | ||
inputs: | ||
debug_enabled: | ||
type: boolean | ||
description: 'Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)' | ||
required: false | ||
default: false | ||
branches: | ||
- main | ||
pull_request: | ||
|
||
jobs: | ||
kondo: | ||
runs-on: ubuntu-20.04 | ||
timeout-minutes: 10 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: DeLaGuardo/clojure-lint-action@master | ||
with: | ||
check-name: Run clj-kondo | ||
clj-kondo-args: >- | ||
--lint | ||
src | ||
test | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
- uses: actions/[email protected] | ||
- uses: ./.github/actions/setup | ||
with: | ||
cache-key: kondo | ||
- name: Run Kondo | ||
run: >- | ||
clojure -M:kondo --lint src test | ||
tests: | ||
runs-on: ubuntu-20.04 | ||
timeout-minutes: 10 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- 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.1208 | ||
- name: Restore cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: | | ||
~/.m2/repository | ||
~/.gitlibs | ||
~/.deps.clj | ||
key: v1-${{ hashFiles('./deps.edn') }}-postgres | ||
restore-keys: | | ||
v1-${{ hashFiles('./deps.edn') }}- | ||
v1- | ||
# to continue the workflow create an empty file `touch continue` | ||
# or `sudo touch /continue` while still in an SSH session | ||
- name: Setup tmate session | ||
if: ${{ github.event_name == 'workflow_dispatch' && inputs.debug_enabled }} | ||
uses: mxschmitt/action-tmate@v3 | ||
with: | ||
limit-access-to-actor: true | ||
- run: clojure -X:dev:test | ||
name: Run tests | ||
env: | ||
CI: TRUE | ||
- uses: actions/[email protected] | ||
- uses: ./.github/actions/setup | ||
with: | ||
cache-key: tests | ||
- name: Run tests | ||
run: >- | ||
clojure -X:dev:test | ||
env: | ||
CI: TRUE |
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
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
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
Oops, something went wrong.