Skip to content

Merge remote-tracking branch 'origin/main' #140

Merge remote-tracking branch 'origin/main'

Merge remote-tracking branch 'origin/main' #140

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@v3
- name: "🧰 Install Python"
uses: actions/setup-python@v4
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@v3
- name: "🧰 Install Python"
uses: actions/setup-python@v4
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@v3
- name: "🧰 Install Python"
uses: actions/setup-python@v4
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@v2
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@v3
- 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@v3
with:
name: wheel
path: dist/*
- name: "πŸš€ Create GitHub release"
uses: softprops/action-gh-release@v1
with:
name: Release ${{ steps.get-version.outputs.tag }}
files: dist/*
fail_on_unmatched_files: true
draft: false
prerelease: false
generate_release_notes: true