Created
January 7, 2020 12:42
-
-
Save jcf/ba1405ec95b766dc772b97e021cd0e5e to your computer and use it in GitHub Desktop.
Test your Clojure project with test-runner, clj-kondo and GitHub's actions!
This file contains hidden or 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
--- | |
name: myapp | |
on: [push] | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Setup Clojure | |
uses: DeLaGuardo/[email protected] | |
with: | |
tools-deps: '1.10.1.469' | |
- name: Setup Maven | |
uses: actions/setup-java@v1 | |
with: | |
java-version: 1.13 | |
server-id: my.datomic.com | |
server-username: MY_DATOMIC_USERNAME | |
server-password: MY_DATOMIC_PASSWORD | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Cache Maven repository | |
uses: actions/cache@v1 | |
with: | |
path: ~/.m2/repository | |
key: ${{ runner.os }}-maven-${{ hashFiles('deps.edn') }} | |
restore-keys: | | |
${{ runner.os }}-maven- | |
- name: Install dependencies | |
run: clojure -A:dev:test -e '(println "Dependencies installed.")' | |
env: | |
MY_DATOMIC_USERNAME: ${{ secrets.MY_DATOMIC_USERNAME }} | |
MY_DATOMIC_PASSWORD: ${{ secrets.MY_DATOMIC_PASSWORD }} | |
- name: Run test suite | |
run: clojure -A:dev:test -m cognitect.test-runner | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: DeLaGuardo/clojure-lint-action@v1 | |
with: | |
clj-kondo-args: --lint dev resources src test | |
github_token: ${{ secrets.GITHUB_TOKEN }} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment