Skip to content

[pre-commit.ci] pre-commit autoupdate #266

[pre-commit.ci] pre-commit autoupdate

[pre-commit.ci] pre-commit autoupdate #266

Workflow file for this run

name: Python CI
on: [push]
jobs:
style:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
python-version: ['3.11']
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.os }} ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools wheel
pip install -Ur requirements_test.txt
- name: Check PyCodeStyle
run: |
pycodestyle --statistics --count pyerge
- name: Check PyDocStyle
run: |
pydocstyle --count pyerge
- name: Check interrogate
run: |
interrogate -c pyproject.toml -vv
- name: Check PyLint
run: |
pylint pyerge || echo $(($? % 4))
- name: Check flake8
run: |
flake8 . --select=E9,F63,F7,F82 --show-source
flake8 . --exit-zero --ignore=E501
- name: Check MANIFEST
run: |
check-manifest -q || echo $(($? -1))
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
python-version: ['3.7', '3.8', '3.9', '3.10']
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.os }} ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools wheel
pip install -Ur requirements_test.txt
- name: Test with pytest
run: |
python -m pytest
coverage:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
python-version: ['3.11']
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.os }} ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools wheel
pip install -Ur requirements_test.txt
- name: Check mypy
run: |
mypy pyerge # || echo $(($? - 1))
- name: Test with pytest
run: |
python -m pytest --cov=pyerge --cov-report=xml --cov-report=html --cov-report=term
- name: Upload pytest and mypy results
uses: actions/upload-artifact@v3
if: always()
with:
name: test_mypy-${{ matrix.os }}-py${{ matrix.python-version }}
path: |
htmlcov/*
mypyhtml/*
coverage.xml
retention-days: 4
- name: Run codacy-coverage
env:
CODACY_PROJECT_TOKEN: ${{ secrets.CODACY_PROJECT_TOKEN }}
run: |
python-codacy-coverage -r coverage.xml
- name: Test Coveralls
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COVERALLS_SERVICE_NAME: github
run: |
coveralls