Skip to content

prepare for release #41

prepare for release

prepare for release #41

Workflow file for this run

name: Pytest
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest] #ubuntu-latest
python-version: ["3.10"]
env:
OS: ${{ matrix.os }}
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: |
python -m pip install --upgrade pip
pip install flake8 pytest #pytest-cov
pip install coverage
pip install -r requirements.txt
python setup.py install
- name: Lint with flake8
run: |
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest
run: |
#pytest tests/test_network.py -s --doctest-modules --junitxml=junit/test-results.xml --cov --cov-report=xml --cov-report=html
coverage run -m pytest tests/test_network.py -s --doctest-modules --junitxml=junit/test-results.xml
coverage xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
directory: ./coverage/reports/
env_vars: OS,PYTHON
fail_ci_if_error: true
files: ./coverage.xml
flags: pytest
name: codecov-umbrella
path_to_write_report: ./coverage/codecov_report.txt
verbose: true