-
Notifications
You must be signed in to change notification settings - Fork 4
33 lines (29 loc) · 963 Bytes
/
clojure.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
name: Tests
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Install karma
run: |
sudo npm install -g karma
sudo npm install -g karma-cljs-test
sudo npm install -g karma-firefox-launcher
sudo npm install -g karma-chrome-launcher
- name: Install dependencies
run: lein deps
- name: Run tests
run: |
lein doo firefox-headless test once
lein doo chrome-headless test once
lein test
- name: Notify with mattermost upon failure
if: failure()
env:
SECRET: ${{ secrets.MATTERMOST_WEBHOOK_URL }}
CHANNEL: "active-clojure"
USERNAME: "GitHub"
run: |
URL=https://github.com/${GITHUB_REPOSITORY}/commit/${GITHUB_SHA}
curl -i --data-urlencode "payload={\"channel\":\"${CHANNEL}\", \"username\":\"${USERNAME}\",\"text\":\"Failure in tests: ${URL}\"}" ${SECRET}