-
-
Notifications
You must be signed in to change notification settings - Fork 30
48 lines (45 loc) · 1.42 KB
/
python-package.yml
File metadata and controls
48 lines (45 loc) · 1.42 KB
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
name: build
on:
push:
branches: [ develop ]
pull_request:
branches: [ develop ]
jobs:
build:
runs-on: ${{ matrix.platform }}
strategy:
fail-fast: false
matrix:
platform: ['ubuntu-latest', 'windows-latest', 'macos-latest']
python-version: ['3.8', '3.9', '3.10', '3.11']
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -r tests/requirements.txt
python -m pip install flake8 check-manifest pytest codecov coverage
python -m pip install .
- name: Check manifest
run: check-manifest
- name: Lint with flake8
run: |
flake8 . --count --select=E9,F63,F7,F82 --show-source
flake8 . --count --exit-zero --max-complexity=10
- name: Documentation
run: |
python -m pip install sphinx
pushd docs && make html && popd
if: success() && matrix.platform == 'ubuntu-latest' && matrix.lc-all == 'en_US.utf-8' && matrix.python-version == '3.9'
- name: Test with pytest (Ubuntu)
run: |
coverage run -m pytest
coverage xml
- name: Uploade coverage to codecov
uses: codecov/codecov-action@v3
with:
fail_ci_if_error: true