-
Notifications
You must be signed in to change notification settings - Fork 21
107 lines (100 loc) · 2.84 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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
name: CI
on:
push:
schedule:
- cron: 13 01 * * *
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
jobs:
docker-hub-login:
name: login to Docker Hub
runs-on: [linux, large, docker]
steps:
- uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_HUB_USER }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
logout: false
docker-build-cache:
name: docker build cache
needs: docker-hub-login
runs-on: [linux, large, docker]
steps:
- uses: docker/setup-buildx-action@v3
with:
install: true
- uses: docker/build-push-action@v5
id: build
with:
cache-from: type=gha
cache-to: type=gha,mode=max
tags: fluree/db
load: true
test-browser:
name: test flureedb.js
needs: docker-build-cache
runs-on: [linux, large, docker]
steps:
- uses: docker/setup-buildx-action@v3
with:
install: true
- uses: docker/build-push-action@v5
with:
cache-from: type=gha
cache-to: type=gha,mode=max
tags: fluree/db
load: true
- name: Run tests
run: docker run fluree/db make browser-test
test-cljs:
name: run cljs tests
needs: docker-build-cache
runs-on: [linux, large, docker]
steps:
- uses: docker/setup-buildx-action@v3
with:
install: true
- uses: docker/build-push-action@v5
with:
cache-from: type=gha
cache-to: type=gha,mode=max
tags: fluree/db
load: true
- name: Run tests
run: |
docker create --name fluree-db fluree/db true
docker cp fluree-db:/usr/src/flureedb/docker-chrome-seccomp.json .
docker rm fluree-db
docker run --security-opt seccomp=docker-chrome-seccomp.json fluree/db make cljstest
test-other:
name: run other tests
needs: docker-build-cache
runs-on: [linux, large, docker]
steps:
- uses: docker/setup-buildx-action@v3
with:
install: true
- uses: docker/build-push-action@v5
with:
cache-from: type=gha
cache-to: type=gha,mode=max
tags: fluree/db
load: true
- name: Run tests
run: docker run fluree/db make cljtest eastwood nodejs-test
notifications:
name: send notifications
if: always()
needs: [test-browser, test-cljs, test-other]
runs-on: [linux, large, docker]
steps:
- name:
if: github.ref == 'refs/heads/main' && failure()
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
uses: voxmedia/github-action-slack-notify-build@v2
with:
channel: development
status: FAILED
color: danger