-
Notifications
You must be signed in to change notification settings - Fork 76
66 lines (51 loc) · 1.75 KB
/
build.yaml
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
name: Build
on:
pull_request:
branches: [main, dev]
workflow_dispatch:
inputs:
debug_enabled:
type: boolean
description: Debug with tmate
required: false
default: false
jobs:
build:
runs-on: ubuntu-22.04
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Fetch all tags and branches
run: git fetch --prune --unshallow
- name: Create ArangoDB Docker container
run: >
docker create --name arango -p 8529:8529 -e ARANGO_ROOT_PASSWORD=passwd -v "$(pwd)/tests/static/":/tests/static
arangodb/arangodb:3.10.9 --server.jwt-secret-keyfile=/tests/static/keyfile
- name: Start ArangoDB Docker container
run: docker start arango
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Debug with tmate
uses: mxschmitt/action-tmate@v3
if: ${{ github.event_name == 'workflow_dispatch' && inputs.debug_enabled }}
- name: Run pre-commit checks
uses: pre-commit/[email protected]
- name: Install dependencies
run: pip install .[dev]
- name: Run unit tests
run: py.test --complete --cov=arango --cov-report=xml
- name: Run Sphinx doctest
run: python -m sphinx -b doctest docs docs/_build
- name: Generate Sphinx HTML
run: python -m sphinx -b html -W docs docs/_build
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
if: matrix.python-version == '3.10'
with:
fail_ci_if_error: false
token: ${{ secrets.CODECOV_TOKEN }}