forked from vernemq/vernemq
-
Notifications
You must be signed in to change notification settings - Fork 5
78 lines (76 loc) · 1.91 KB
/
pr.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
name: checks format & runs tests
on:
push:
branches:
- 'main'
pull_request:
release:
types:
- published
workflow_dispatch:
jobs:
code_checks:
name: Check code style and quality
runs-on: ubuntu-20.04
steps:
- uses: actions/[email protected]
- uses: erlef/setup-beam@v1
with:
otp-version: 23.0
version-type: strict
- run: sudo apt-get -y install libsnappy-dev
- name: Check code formatting (erlfmt)
run: ./rebar3 fmt -c
- name: Run dialyzer type checker
run: ./rebar3 dialyzer
coverage:
runs-on: ubuntu-20.04
needs: code_checks
services:
postgres:
image: postgres
ports:
- 5432:5432
env:
POSTGRES_USER: vmq_test_user
POSTGRES_PASSWORD: vmq_test_password
POSTGRES_DB: vmq_test_database
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
memcached:
image: memcached
ports:
- 11211:11211
redis:
image: redis
ports:
- 6379:6379
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
redissentinel:
image: bitnami/redis-sentinel
ports:
- 26379:26379
options: >-
--health-cmd "redis-cli -p 26379 ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/[email protected]
- uses: erlef/setup-beam@v1
with:
otp-version: 23.0
version-type: strict
- run: sudo apt-get -y install libsnappy-dev
- run: sudo apt-get -y install pcregrep
- run: make rel
- run: make db-setup
- run: pwd
- run: sh ./run-tests-with-retry.sh .