ci: update Github Action workflows #1
Workflow file for this run
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
# Basic workflow for building and testing the pip installation | |
name: Continuous Integration | |
on: | |
pull_request: | |
branches: [ main, develop ] | |
types: [opened, synchronize, reopened, edited] | |
workflow_dispatch: # Allows you to run this workflow manually from the Actions tab | |
jobs: | |
Code_Quality_Check: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ['3.10', 3.11] | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v3 | |
- name: Setup Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v3 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Setup Poetry | |
uses: abatilo/actions-poetry@v2.1.0 | |
with: | |
poetry-version: 1.5.1 | |
- name: Configure Poetry Settings | |
shell: bash | |
run: python -m poetry config virtualenvs.in-project true | |
- name: Verify Poetry Version | |
run: poetry --version | |
- name: Install Project Dependencies | |
run: python -m poetry install | |
- name: Lint Codebase with flake8 | |
run: | | |
python -m poetry run flake8 . --exclude .venv --count --select=E9,F63,F7,F82 --show-source --statistics | |
python -m poetry run flake8 . --exclude .venv --count --exit-zero --max-complexity=10 --max-line-length=79 --statistics | |
- name: Execute Tests with pytest and Coverage | |
run: | | |
python -m poetry run coverage run -m pytest | |
python -m poetry run coverage report -m | |
python -m poetry run coverage xml | |
- name: Upload Coverage Report to Codecov | |
uses: codecov/codecov-action@v3 | |
with: | |
files: ./coverage.xml | |