-
Notifications
You must be signed in to change notification settings - Fork 259
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update CI tests and add shadow-cljs to run cljs tests
- Loading branch information
Showing
8 changed files
with
1,950 additions
and
2,625 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 |
---|---|---|
|
@@ -16,81 +16,94 @@ jobs: | |
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Cache dependencies | ||
uses: actions/cache@v2 | ||
uses: actions/cache@v4 | ||
with: | ||
path: ~/.m2/repository | ||
key: ${{ runner.os }}-clj-${{ hashFiles('**/project.clj') }} | ||
restore-keys: | | ||
${{ runner.os }}-clj- | ||
- name: Setup Java ${{ matrix.jdk }} | ||
uses: actions/setup-java@v1.4.3 | ||
uses: actions/setup-java@v4 | ||
with: | ||
distribution: temurin | ||
java-version: ${{ matrix.jdk }} | ||
|
||
- name: Setup Clojure | ||
uses: DeLaGuardo/setup-clojure@3.1 | ||
uses: DeLaGuardo/setup-clojure@13.0 | ||
with: | ||
lein: 2.9.5 | ||
- name: Install dependencies | ||
run: | | ||
npm ci | ||
|
||
- name: Run tests | ||
run: ./scripts/test.sh clj | ||
|
||
build-cljs: | ||
name: ClojureScript | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Cache dependencies | ||
uses: actions/cache@v2 | ||
with: | ||
path: | | ||
~/.m2/repository | ||
**/node_modules | ||
key: ${{ runner.os }}-cljs-${{ hashFiles('**/project.clj', '**/package-lock.json') }} | ||
key: ${{ runner.os }}-cljs-${{ hashFiles('**/project.clj') }} | ||
restore-keys: | | ||
${{ runner.os }}-cljs- | ||
- name: Setup Java 11 | ||
uses: actions/[email protected] | ||
- name: Setup Java | ||
uses: actions/setup-java@v4 | ||
with: | ||
java-version: 11 | ||
distribution: temurin | ||
java-version: 21 | ||
|
||
- name: Setup Clojure | ||
uses: DeLaGuardo/setup-clojure@3.1 | ||
uses: DeLaGuardo/setup-clojure@13.0 | ||
with: | ||
lein: 2.9.5 | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v2.1.2 | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 18 | ||
node-version: 22 | ||
cache: npm | ||
|
||
- name: Install dependencies | ||
run: | | ||
npm ci | ||
- name: Install modules | ||
run: ./scripts/lein-modules install | ||
run: npm ci | ||
|
||
# - name: Install modules | ||
# run: ./scripts/lein-modules install | ||
|
||
- name: Run tests | ||
run: ./scripts/test.sh cljs | ||
|
||
lint: | ||
name: Lint cljdoc.edn | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Verify cljdoc.edn | ||
run: curl -fsSL https://raw.githubusercontent.com/cljdoc/cljdoc/master/script/verify-cljdoc-edn | bash -s doc/cljdoc.edn | ||
|
||
check-cljdoc: | ||
name: Check cljdoc analysis | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Setup Clojure | ||
uses: DeLaGuardo/setup-clojure@11.0 | ||
uses: DeLaGuardo/setup-clojure@13 | ||
with: | ||
lein: 2.9.5 | ||
cli: 1.11.0.1100 | ||
|
||
- name: Install cljdoc analyzer | ||
run: clojure -Ttools install io.github.cljdoc/cljdoc-analyzer '{:git/tag "RELEASE"}' :as cljdoc-analyzer | ||
|
||
- name: CljDoc Check | ||
run: ./scripts/cljdoc-check.sh |
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 |
---|---|---|
|
@@ -14,3 +14,4 @@ pom.xml.asc | |
figwheel_server.log | ||
/.idea | ||
.clj-kondo | ||
.shadow-cljs |
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,20 @@ | ||
module.exports = function (config) { | ||
config.set({ | ||
browsers: ['ChromeHeadless'], | ||
// The directory where the output file lives | ||
basePath: 'target/karma', | ||
// The file itself | ||
files: ['ci.js'], | ||
frameworks: ['cljs-test'], | ||
plugins: ['karma-cljs-test', 'karma-chrome-launcher'], | ||
colors: true, | ||
logLevel: config.LOG_INFO, | ||
client: { | ||
args: ["shadow.test.karma.init"], | ||
singleRun: true | ||
}, | ||
junitReporter: { | ||
outputDir: "target/results/cljs" | ||
} | ||
}) | ||
}; |
Oops, something went wrong.