-
Notifications
You must be signed in to change notification settings - Fork 65
44 lines (42 loc) · 1.46 KB
/
build-test-actions.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
44
name: build-test-actions
on: [push]
jobs:
build-test:
runs-on: ubuntu-latest
strategy:
matrix:
# Add versions here to expand support matrix
python-version: ["3.10", "3.11"]
env:
PYTHON: ${{ matrix.python-version }}
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: |
sudo apt-get install -y libblas-dev liblapack-dev
python -m pip install --upgrade pip
pip install poetry
poetry install --no-interaction
- name: Run tests
run: poetry run pytest -v --cov-config=.coveragerc --cov-report term-missing --cov-report xml:coverage.xml --cov=toqito tests/
- name: Run pylint
run: poetry run pylint --exit-zero tests/ toqito/
- name: Run pydocstyle
run: poetry run pydocstyle tests/ toqito/ || true
# Remove "|| true" after style issues are fixed
# to make this fail the pipeline when new issues
# are introduced.
- name: Upload coverage information
uses: codecov/codecov-action@v3
with:
token: 8a7d94ed-284d-4c22-91eb-9b66ce33fa62
name: codecov-umbrella
files: ./coverage.xml
fail_ci_if_error: true
verbose: true
- name: Build artifacts
run: poetry build