-
Notifications
You must be signed in to change notification settings - Fork 2
65 lines (63 loc) · 2.02 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
name: CI
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Use Node.js 12.x
uses: actions/setup-node@v1
with:
node-version: 12.x
- name: Prepare java # java needs to be installed before clojure.
uses: actions/setup-java@v3
with:
distribution: 'zulu' # https://github.com/actions/setup-java/blob/main/README.md#Supported-distributions
java-version: '17'
java-package: jdk # optional (jdk or jre) - defaults to jdk
- name: Install clojure tools
uses: DeLaGuardo/setup-clojure@12.5
with:
cli: 1.10.3.1029 # Clojure CLI based on tools.deps
bb: 0.7.8 # Babashka
clj-kondo: 2022.05.31 # Clj-kondo
cljfmt: 0.10.2 # cljfmt
- name: cljfmt lint
run: |
cd webly
clojure -M:cljfmt check src
clojure -M:lint src
- name: test cljs+clj
if: success()
run: |
cd demo
clojure -X:webly:npm-install
clojure -X:webly:ci
npm test
clojure -X:test-clj
- name: clojars deploy
if: success()
# if: github.event_name == 'push'
env:
CLOJARS_USERNAME: ${{ secrets.ReleaseUsername }}
CLOJARS_PASSWORD: ${{ secrets.ReleasePassword }}
CODECOV_TOKEN: ${{ secrets.CodecovToken }}
run: |
git config --global user.email "ci@pinkgorilla.org"
git config --global user.name "CI/CD"
cd webly
clojure -T:build jar
clojure -T:build deploy
# bash <(curl -s https://codecov.io/bash)
# lein with-profile +relay-jetty cloverage
# bash <(curl -s https://codecov.io/bash) -f target/coverage/codecov.json
#
# Could not transfer metadata foo:bar/maven-metadata.xml from/to releases (https://clojars.org/repo): Read timed out
# Default 10000 not enough for us
# export LEIN_JVM_OPTS="-Dmaven.wagon.rto=90000"