-
Notifications
You must be signed in to change notification settings - Fork 6
43 lines (43 loc) · 1.39 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
name: CI
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.9
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y graphviz
python -m pip install --upgrade pip
pip install -v .
if [ -f requirements-dev.txt ]; then pip install -r requirements-dev.txt; fi
- name: Check code style
run: |
flake8 --max-line-length=115 --exclude versioneer.py,docs/*
- name: Unit tests and coverage
run: |
coverage run --source=pypahdb --omit "pypahdb/_version.py","pypahdb/tests/*" -m pytest --pyargs pypahdb.tests
- name: Generate coverage report
run: |
coverage report -m
coverage xml
- name: Upload coverage report to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: coverage.xml
fail_ci_if_error: true
verbose: true
- name: Build documentation
run: |
make -C docs html
- name: Publish documentation
if: ${{ github.event_name == 'push' }}
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/build/html