-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add test workflow #249
Add test workflow #249
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
on: | ||
push: | ||
branches: [ master ] | ||
pull_request: | ||
branches: [ master ] | ||
|
||
jobs: | ||
test-clj: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3.0.2 | ||
|
||
- name: Setup Java | ||
uses: actions/setup-java@v3.4.0 | ||
with: | ||
distribution: temurin | ||
java-version: 17 | ||
|
||
- name: Setup Clojure | ||
uses: DeLaGuardo/setup-clojure@9.3 | ||
with: | ||
cli: latest | ||
lein: latest | ||
bb: latest | ||
|
||
- name: Cache | ||
uses: actions/cache@v3.0.5 | ||
with: | ||
path: | | ||
~/.m2/repository | ||
~/.gitlibs | ||
~/.deps.clj | ||
key: cljdeps-${{ hashFiles('project.clj', 'deps.edn', 'bb.edn') }} | ||
restore-keys: cljdeps- | ||
|
||
- name: Uberjar | ||
run: lein uberjar | ||
|
||
# - name: Babashka tests | ||
# run: bb test:bb | ||
|
||
- name: Clojure tests | ||
run: clojure -M:cljtest:humane:runner | ||
|
||
- name: Integration tests | ||
run: ./test_config $(awk -F "\"" '{print $2}' project.clj | head -n 1) uberjar | ||
|
||
test-cljs: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You might want to at least draft a lint job. https://github.com/clj-kondo/lein-clj-kondo needs particularly little setup (no graalvm installation, etc) |
||
runs-on: macos-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3.0.2 | ||
|
||
- name: Setup Java | ||
uses: actions/setup-java@v3.4.0 | ||
with: | ||
distribution: temurin | ||
java-version: 17 | ||
|
||
- name: Setup Clojure | ||
uses: DeLaGuardo/setup-clojure@9.3 | ||
with: | ||
cli: latest | ||
lein: latest | ||
bb: latest | ||
Comment on lines
+64
to
+66
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Have you considered using fixed versions? It's often quite annoying to have CI builds break for seemingly no reason There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, and actually I would like to propose using dependency updating the tool I'm actively contributing to: https://github.com/renovatebot/renovate The app is free for GitHub, and it handles Using it, we would have both of the two worlds: fresh dependencies (thanks to Renovate) and merge confidence (thanks to CI tests) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Here is my demo of what is possible with automatic dependency updates: @kkinnear What do you think?
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Wow, that's amazing. As you may have noticed, I rarely change the versions of the things on which zprint depends, as I find it a pain to debug things like that when they break. Not that they break all that often, other than graalVM, which I noticed isn't something that I didn't read too closely, but is it the case that if it automatically accepts the In any case, I'm up for giving There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It can create PRs for you to review and merge, but also can be configured to automatically merge non-major releases once all CI checks are passing, leaving major updates up to you. Also it can create Dependency Dashboard issue for managing dependencies from the single central place. Actually, it's very configurable. For example, I think it's possible to make it upgrade clojure dependencies that are documented in the markdown files (using regex). So again, recommend you to give it a try once we're done here with build/test pipeline. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Speaking of GraalVM, it's also possible to upgrade it automatically (and test on CI), as soon as we refer to https://github.com/graalvm/graalvm-ce-builds releases somewhere in the code |
||
|
||
- name: Cache | ||
uses: actions/cache@v3.0.5 | ||
with: | ||
path: | | ||
~/.m2/repository | ||
~/.gitlibs | ||
~/.deps.clj | ||
key: cljdeps-${{ hashFiles('project.clj', 'deps.edn', 'bb.edn') }} | ||
restore-keys: cljdeps- | ||
|
||
- name: Uberjar | ||
run: lein uberjar | ||
|
||
- name: Install Planck | ||
run: brew install planck | ||
|
||
- name: ClojureScript tests | ||
run: clojure -M:cljs-runner |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have you considered using a matrix syntax? Running it on all the LTS JDK versions would seem reasonable.