1
1
name : Build
2
2
on :
3
3
push :
4
- branches : [ main, dev ]
4
+ branches : [main, dev]
5
5
pull_request :
6
- branches : [ main, dev ]
6
+ branches : [main, dev]
7
7
workflow_dispatch :
8
8
inputs :
9
9
debug_enabled :
10
10
type : boolean
11
- description : Run the build with tmate debugging
11
+ description : Debug with tmate
12
12
required : false
13
13
default : false
14
14
@@ -18,42 +18,41 @@ jobs:
18
18
19
19
strategy :
20
20
matrix :
21
- python-version : [ "3.7", "3.8", "3.9", "3.10" ]
21
+ python-version : ["3.7", "3.8", "3.9", "3.10", "3.11.1"]
22
+
23
+ services :
24
+ arango :
25
+ image : arangodb/arangodb:3.7.7
26
+ ports :
27
+ - 8529:8529
28
+ options : --name arango -e ARANGO_ROOT_PASSWORD=passwd --server.jwt-secret-keyfile=/tmp/keyfile
22
29
23
30
steps :
24
31
- name : Checkout repository
25
32
uses : actions/checkout@v3
26
33
27
- - name : Fetch complete history for all tags and branches
34
+ - name : Fetch all tags and branches
28
35
run : git fetch --prune --unshallow
29
36
30
- - name : Create ArangoDB Docker container
31
- run : >
32
- docker create --name arango -p 8529:8529 -e ARANGO_ROOT_PASSWORD=passwd
33
- arangodb/arangodb:3.7.7 --server.jwt-secret-keyfile=/tmp/keyfile
34
-
35
37
- name : Copy Foxx service zip into ArangoDB Docker container
36
38
run : docker cp tests/static/service.zip arango:/tmp/service.zip
37
39
38
40
- name : Copy keyfile into ArangoDB Docker container
39
41
run : docker cp tests/static/keyfile arango:/tmp/keyfile
40
42
41
- - name : Start ArangoDB Docker container
42
- run : docker start arango
43
-
44
- - name : Set up Python ${{ matrix.python-version }}
43
+ - name : Set up Python
45
44
uses : actions/setup-python@v4
46
45
with :
47
46
python-version : ${{ matrix.python-version }}
48
47
49
- - name : Start tmate session
48
+ - name : Debug with tmate
50
49
uses : mxschmitt/action-tmate@v3
51
50
if : ${{ github.event_name == 'workflow_dispatch' && inputs.debug_enabled }}
52
51
53
52
- name : Run pre-commit checks
54
53
uses : pre-commit/action@v3.0.0
55
54
56
- - name : Install package
55
+ - name : Install dependencies
57
56
run : pip install .[dev]
58
57
59
58
- name : Run unit tests
67
66
68
67
- name : Upload coverage to Codecov
69
68
uses : codecov/codecov-action@v3
70
- if : matrix.python-version == '3.8 '
69
+ if : matrix.python-version == '3.10 '
71
70
with :
72
71
fail_ci_if_error : false
73
72
token : ${{ secrets.CODECOV_TOKEN }}
0 commit comments