Update setup.py #153
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "Pull Request Continuous Integration" | |
on: | |
pull_request: | |
branches: [ main ] | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11'] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install .[dev] | |
- name: Lint with flake8 | |
run: | | |
flake8 collie tests | |
- name: Test with pytest | |
run: | | |
pytest -v | |
- name: Verify build | |
run: | | |
pip install --upgrade pip wheel twine | |
python setup.py sdist bdist_wheel | |
codecov: | |
runs-on: ubuntu-latest | |
needs: [test] | |
steps: | |
- uses: actions/checkout@master | |
- name: Set up Python | |
uses: actions/setup-python@master | |
with: | |
python-version: 3.8 | |
- name: Install dev dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install .[dev] | |
- name: Generate coverage report | |
run: | | |
pytest --cov=collie --cov-report=xml | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v1 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
file: ./coverage.xml | |
files: ./coverage1.xml,./coverage2.xml | |
directory: ./coverage/reports/ | |
flags: unittests | |
name: codecov-umbrella | |
fail_ci_if_error: true | |
path_to_write_report: ./codecov_report.txt | |
verbose: true |