-
-
Notifications
You must be signed in to change notification settings - Fork 0
142 lines (131 loc) · 3.83 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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
name: CI
on:
pull_request:
branches:
- master
jobs:
lint:
name: Code Quality Checks
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- uses: erlef/setup-beam@v1
with:
otp-version: '26.1'
elixir-version: '1.15.6'
- uses: actions/cache@v4
with:
path: |
deps
_build
key: ${{ runner.os }}-mix-'1.15.6'-'26.1'-${{ hashFiles('**/mix.lock') }}
- run: mix deps.get
- run: mix deps.compile
- name: Check Code Formatting
run: mix format --check-formatted
test:
name: BoltVersion ${{ matrix.boltVersion }}, DB ${{matrix.db}}
runs-on: ubuntu-latest
needs: lint
strategy:
fail-fast: false
matrix:
boltVersion:
- '4.0'
- '4.1'
- '4.2'
- '4.3'
- '4.4'
- '5.0'
- '5.1'
- '5.2'
- '5.3'
- '5.4'
include:
- boltVersion: '4.0'
db: neo4j:4.4.27-community
mixTestPartition: 4
- boltVersion: '4.1'
db: neo4j:4.4.27-community
mixTestPartition: 5
- boltVersion: '4.2'
db: neo4j:4.4.27-community
mixTestPartition: 6
- boltVersion: '4.3'
db: neo4j:4.4.27-community
mixTestPartition: 7
- boltVersion: '4.4'
db: neo4j:4.4.27-community
mixTestPartition: 8
- boltVersion: '5.0'
db: neo4j:5.13.0-community
mixTestPartition: 9
- boltVersion: '5.1'
db: neo4j:5.13.0-community
mixTestPartition: 10
- boltVersion: '5.2'
db: neo4j:5.13.0-community
mixTestPartition: 11
- boltVersion: '5.3'
db: neo4j:5.13.0-community
mixTestPartition: 12
- boltVersion: '5.4'
db: neo4j:5.13.0-community
mixTestPartition: 13
env:
MIX_ENV: test
BOLT_VERSIONS: ${{matrix.boltVersion}}
BOLT_TCP_PORT: 7687
MIX_TEST_PARTITION: 1
BOLT_URI: "bolt://localhost:7687"
TEST_PARTITION_NUMBER: ${{ matrix.mixTestPartition }}
RUN_ID: ${{github.run_id}}
steps:
- run: docker run -p 7687:7687 -e NEO4J_AUTH=neo4j/boltxPassword -e NEO4J_dbms_connector_bolt_listen__address=:7687 --detach ${{matrix.db}}
- name: Checkout code
uses: actions/checkout@v4
- uses: erlef/setup-beam@v1
with:
otp-version: '26.1'
elixir-version: '1.15.6'
- uses: actions/cache@v4
with:
path: |
deps
_build
key: ${{ runner.os }}-mix-1.15.6'-'26.1'-${{ hashFiles('**/mix.lock') }}
- run: mix deps.get
- run: mix deps.compile
- name: Run Test Script
run: |
mix test --cover --partitions 1 --export-coverage coverdata-${RUN_ID}-${TEST_PARTITION_NUMBER}
working-directory: .
- uses: actions/upload-artifact@v4
with:
name: coverdata-${{ github.run_id }}-${{matrix.mixTestPartition}}
path: cover
retention-days: 1
coverage:
name: Coverage
runs-on: ubuntu-latest
needs: [test]
steps:
- name: Checkout code
uses: actions/checkout@v4
- uses: erlef/setup-beam@v1
with:
otp-version: '26.1'
elixir-version: '1.15.6'
- uses: actions/cache@v4
with:
path: |
deps
_build
key: ${{ runner.os }}-mix-1.15.6'-'26.1'-${{ hashFiles('**/mix.lock') }}
- uses: actions/download-artifact@v4
with:
path: cover
pattern: coverdata-${{ github.run_id }}-*
merge-multiple: true
- run: mix test.coverage