-
Notifications
You must be signed in to change notification settings - Fork 1
47 lines (38 loc) · 1.23 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
name: CI
on:
push:
branches-ignore:
- master
pull_request:
types: [opened, ready_for_review, review_requested]
# Allows the CI to use the secrets to push to ECR when a fork is merged.
# You can see the if statement in the ECR step.
pull_request_target:
types: [closed]
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: Run the clj tests
run: clojure -A:jvm-base:server/test
- name: Run the cljs tests
run: clojure -A:jvm-base:client:web/test-headless
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
- name: Build main.js
run: clojure -T:build js-bundle
- name: Build image and push to ECR
if: github.event.pull_request.merged == true
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
ECR_REPO: ${{ secrets.ECR_REPO }}
run: clojure -T:jib build