mirror of
https://github.com/metosin/reitit.git
synced 2025-12-24 10:58:25 +00:00
78 lines
2 KiB
YAML
78 lines
2 KiB
YAML
name: testsuite
|
|
|
|
on:
|
|
push:
|
|
pull_request:
|
|
|
|
jobs:
|
|
build-clj:
|
|
strategy:
|
|
matrix:
|
|
# Supported Java versions: LTS releases 8 and 11 and the latest release
|
|
jdk: [8, 11, 15]
|
|
|
|
name: Clojure (Java ${{ matrix.jdk }})
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: Cache dependencies
|
|
uses: actions/cache@v2
|
|
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
|
|
with:
|
|
java-version: ${{ matrix.jdk }}
|
|
- name: Setup Clojure
|
|
uses: DeLaGuardo/setup-clojure@3.1
|
|
with:
|
|
lein: 2.9.5
|
|
- name: Run tests
|
|
run: ./scripts/test.sh clj
|
|
|
|
build-cljs:
|
|
name: ClojureScript
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: Cache dependencies
|
|
uses: actions/cache@v2
|
|
with:
|
|
path: |
|
|
~/.m2/repository
|
|
**/node_modules
|
|
key: ${{ runner.os }}-cljs-${{ hashFiles('**/project.clj', '**/package-lock.json') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-cljs-
|
|
- name: Setup Java 11
|
|
uses: actions/setup-java@v1.4.3
|
|
with:
|
|
java-version: 11
|
|
- name: Setup Clojure
|
|
uses: DeLaGuardo/setup-clojure@3.1
|
|
with:
|
|
lein: 2.9.5
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v2.1.2
|
|
with:
|
|
node-version: 12
|
|
- name: Install dependencies
|
|
run: |
|
|
npm ci
|
|
- name: Install modules
|
|
run: ./scripts/lein-modules install
|
|
- name: Run tests
|
|
run: ./scripts/test.sh cljs
|
|
|
|
lint:
|
|
name: Lint
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: Verify cljdoc.edn
|
|
run: curl -fsSL https://raw.githubusercontent.com/cljdoc/cljdoc/master/script/verify-cljdoc-edn | bash -s doc/cljdoc.edn
|