Skip to content

Update pytest-cov requirement from ~=4.0 to ~=6.0 #284

Update pytest-cov requirement from ~=4.0 to ~=6.0

Update pytest-cov requirement from ~=4.0 to ~=6.0 #284

Workflow file for this run

name: "CI"
on:
push:
jobs:
code-format:
name: "πŸ” Python code format"
runs-on: ubuntu-latest
steps:
- name: "πŸ“₯ Check-out"
uses: actions/checkout@v4
- name: "🧰 Install Python"
uses: actions/setup-python@v5
with:
python-version: "3.10"
cache: pip
cache-dependency-path: pyproject.toml
- name: "🧰 Install Protoc"
run: sudo apt install protobuf-compiler
- name: "🧰 Install dependencies"
run: |
python -m pip install --upgrade pip
pip install .
pip install .[tests]
- name: "πŸ” Check Python code format"
run: flake8 archive_query_log/
lint:
name: "πŸ” Python Lint"
runs-on: ubuntu-latest
steps:
- name: "πŸ“₯ Check-out"
uses: actions/checkout@v4
- name: "🧰 Install Python"
uses: actions/setup-python@v5
with:
python-version: "3.10"
cache: pip
cache-dependency-path: pyproject.toml
- name: "🧰 Install Protoc"
run: sudo apt install protobuf-compiler
- name: "🧰 Install dependencies"
run: |
python -m pip install --upgrade pip
pip install .
pip install .[tests]
- name: "πŸ” Lint Python code"
run: pylint -E archive_query_log
unit-tests:
name: "πŸ§ͺ Python unit tests"
runs-on: ubuntu-latest
steps:
- name: "πŸ“₯ Check-out"
uses: actions/checkout@v4
- name: "🧰 Install Python"
uses: actions/setup-python@v5
with:
python-version: "3.10"
cache: pip
cache-dependency-path: pyproject.toml
- name: "🧰 Install Protoc"
run: sudo apt install protobuf-compiler
- name: "🧰 Install dependencies"
run: |
python -m pip install --upgrade pip
pip install .
pip install .[tests]
- name: "πŸ§ͺ Test Python code"
run: pytest --cov=./ --cov-report=xml --capture=no archive_query_log/
- name: "πŸ“€ Upload coverage to Codecov"
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
release:
name: "πŸš€ Create GitHub release"
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
needs:
- code-format
- lint
- unit-tests
runs-on: ubuntu-latest
steps:
- name: "πŸ“₯ Check-out"
uses: actions/checkout@v4
- name: "🏷️ Get version tag"
id: get-version
run: echo ::set-output name=tag::${GITHUB_REF/refs\/tags\//}
- name: "πŸ“₯ Download Python wheel"
uses: actions/upload-artifact@v4
with:
name: wheel
path: dist/*
- name: "πŸš€ Create GitHub release"
uses: softprops/action-gh-release@v2
with:
name: Release ${{ steps.get-version.outputs.tag }}
files: dist/*
fail_on_unmatched_files: true
draft: false
prerelease: false
generate_release_notes: true