This repository was archived by the owner on Sep 21, 2023. It is now read-only.
forked from arangodb/python-arango
-
Notifications
You must be signed in to change notification settings - Fork 5
55 lines (55 loc) · 1.9 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
name: Build
on:
workflow_dispatch:
push:
branches: [ main, dev ]
pull_request:
branches: [ main, dev ]
jobs:
build:
name: Test
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ 3.6, 3.7, 3.8, 3.9 ]
steps:
- uses: actions/checkout@v2
- name: Create ArangoDB Docker container
run: >
docker create --name arango -p 8529:8529 -e ARANGO_ROOT_PASSWORD=passwd
arangodb/arangodb:3.7.7 --server.jwt-secret-keyfile=/tmp/keyfile
- name: Copy Foxx service zip into ArangoDB Docker container
run: docker cp tests/static/service.zip arango:/tmp/service.zip
- name: Copy keyfile into ArangoDB Docker container
run: docker cp tests/static/keyfile arango:/tmp/keyfile
- name: Start ArangoDB Docker container
run: docker start arango
- name: Fetch complete history for all tags and branches
run: git fetch --prune --unshallow
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Setup pip
run: python -m pip install --upgrade pip setuptools wheel
- name: Install packages
run: pip install .[dev]
- name: Run black
run: black --check .
- name: Run flake8
run: flake8 .
- name: Run isort
run: isort --check --profile=black .
- name: Run mypy
run: mypy arango
- name: Run pytest
run: py.test --complete --cov=arango --cov-report=xml
- name: Run Sphinx doctest
run: python -m sphinx -b doctest docs docs/_build
- name: Run Sphinx HTML
run: python -m sphinx -b html -W docs docs/_build
- name: Upload coverge to Codecov
uses: codecov/codecov-action@v1
if: matrix.python-version == '3.8'
with:
token: ${{ secrets.CODECOV_TOKEN }}