-
Notifications
You must be signed in to change notification settings - Fork 1
54 lines (43 loc) · 1.49 KB
/
main.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
name: Test and Build
on:
push:
branches-ignore:
- master
pull_request:
types: [opened, ready_for_review, review_requested]
pull_request_review:
types: [submitted]
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4.1.1
- name: Install clojure tools
uses: DeLaGuardo/setup-clojure@12.1
with:
cli: latest
- name: Verify code base format
run: clojure -T:cljfmt check
- name: Run the clj tests
run: clojure -M:server/test
- name: Run the cljs tests
run: clojure -M:web/test-headless
- name: Build main.js
if: github.event_name == 'push' || github.event.action == 'review_requested' || github.event.action == 'ready_for_review'
run: clojure -T:build js-bundle
- name: Generate RSS feed
if: github.event_name == 'push' || github.event.action == 'review_requested' || github.event.action == 'ready_for_review'
run: clojure -T:build rss-feed
- name: Commit js bundle and rss feed
if: github.event_name == 'push' || github.event.review.state == 'approved'
uses: EndBug/add-and-commit@v9
with:
add: |
resources/public/main.js
resources/public/blog/rss/clojure-feed.xml
committer_name: GitHub Action
default_author: github_actions
message: "Compile the cljs to the js bundle and update RSS feed"