mirror of
https://github.com/metosin/reitit.git
synced 2025-12-18 08:51:12 +00:00
Merge pull request #470 from metosin/feature/migrate-to-github-actions
Migrate to GitHub Actions
This commit is contained in:
commit
e64490f473
3 changed files with 79 additions and 87 deletions
|
|
@ -1,86 +0,0 @@
|
||||||
version: 2.1
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
test-clj:
|
|
||||||
working_directory: ~/test
|
|
||||||
parameters:
|
|
||||||
image-name:
|
|
||||||
type: string
|
|
||||||
docker:
|
|
||||||
- image: << parameters.image-name >>
|
|
||||||
steps:
|
|
||||||
- checkout
|
|
||||||
- restore_cache:
|
|
||||||
keys:
|
|
||||||
- 'v1-clj-{{ checksum "project.clj" }}'
|
|
||||||
- 'v1-clj-'
|
|
||||||
- 'v1-test-'
|
|
||||||
- run:
|
|
||||||
name: Install modules
|
|
||||||
command: ./scripts/lein-modules install
|
|
||||||
- run:
|
|
||||||
name: Run tests
|
|
||||||
command: ./scripts/test.sh clj
|
|
||||||
- run:
|
|
||||||
name: Install curl if missing
|
|
||||||
command: apt update && apt install -y curl
|
|
||||||
- run:
|
|
||||||
name: Verify cljdoc.edn
|
|
||||||
command: curl -fsSL https://raw.githubusercontent.com/cljdoc/cljdoc/master/script/verify-cljdoc-edn | bash -s doc/cljdoc.edn
|
|
||||||
- store_test_results:
|
|
||||||
# path must be a directory under which there a subdirectories that
|
|
||||||
# contain the JUnit XML files.
|
|
||||||
path: ~/test/target/results
|
|
||||||
# - run:
|
|
||||||
# name: Run coverage
|
|
||||||
# command: ./scripts/submit-to-coveralls.sh clj
|
|
||||||
- save_cache:
|
|
||||||
key: 'v1-clj-{{ checksum "project.clj" }}'
|
|
||||||
paths:
|
|
||||||
- ~/.m2
|
|
||||||
- ~/.cljs/.aot_cache
|
|
||||||
|
|
||||||
test-cljs:
|
|
||||||
working_directory: ~/test
|
|
||||||
docker:
|
|
||||||
- image: circleci/clojure:lein-2.8.1-node-browsers
|
|
||||||
steps:
|
|
||||||
- checkout
|
|
||||||
- restore_cache:
|
|
||||||
keys:
|
|
||||||
- 'v1-cljs-{{ checksum "project.clj" }}-{{ checksum "package.json" }}'
|
|
||||||
- 'v1-cljs-'
|
|
||||||
- run:
|
|
||||||
name: Install npm dependencies
|
|
||||||
command: npm install
|
|
||||||
- run:
|
|
||||||
name: Install modules
|
|
||||||
command: ./scripts/lein-modules install
|
|
||||||
- run:
|
|
||||||
name: Run tests
|
|
||||||
command: ./scripts/test.sh cljs
|
|
||||||
- store_test_results:
|
|
||||||
path: ~/test/target/results
|
|
||||||
- save_cache:
|
|
||||||
key: 'v1-cljs-{{ checksum "project.clj" }}-{{ checksum "package.json" }}'
|
|
||||||
paths:
|
|
||||||
- ~/.m2
|
|
||||||
- ~/test/node_modules
|
|
||||||
|
|
||||||
workflows:
|
|
||||||
version: 2
|
|
||||||
test-and-build-docs:
|
|
||||||
jobs:
|
|
||||||
- test-clj:
|
|
||||||
name: jdk8
|
|
||||||
image-name: clojure:openjdk-8-lein-2.9.1
|
|
||||||
- test-clj:
|
|
||||||
name: jdk11
|
|
||||||
image-name: clojure:openjdk-11-lein-2.9.1
|
|
||||||
- test-clj:
|
|
||||||
name: jdk13
|
|
||||||
image-name: clojure:openjdk-13-lein-2.9.1
|
|
||||||
- test-clj:
|
|
||||||
name: jdk14
|
|
||||||
image-name: clojure:openjdk-14-lein-2.9.1
|
|
||||||
- test-cljs
|
|
||||||
78
.github/workflows/testsuite.yml
vendored
Normal file
78
.github/workflows/testsuite.yml
vendored
Normal file
|
|
@ -0,0 +1,78 @@
|
||||||
|
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
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
# reitit [](https://circleci.com/gh/metosin/reitit) [](https://cljdoc.org/jump/release/metosin/reitit) [](https://clojurians.slack.com/messages/reitit/)
|
# reitit [](https://github.com/metosin/reitit/actions?query=workflow%3Atestsuite) [](https://cljdoc.org/jump/release/metosin/reitit) [](https://clojurians.slack.com/messages/reitit/)
|
||||||
|
|
||||||
A fast data-driven router for Clojure(Script).
|
A fast data-driven router for Clojure(Script).
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue