Skip to content

Refactor the implementation #15

Refactor the implementation

Refactor the implementation #15

Workflow file for this run

name: Ubuntu (build-&-test)
on:
push:
branches:
- devel
pull_request:
branches:
- devel
jobs:
# Tests classic build using Tox for selected Python versions
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.10", "3.11"]
steps:
- uses: actions/checkout@v3
- name: Setup Python, Ubuntu and Python environment
uses: ./.github/workflows/actions/setup
with:
python-version: ${{ matrix.python-version }}
- name: Execute tests for Python ${{ matrix.python-version }} using Tox
run: tox -e py
- name: Generate docs for Python ${{ matrix.python-version }} using Tox
run: |
tox -e docs
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
flags: coverage-${{ matrix.python-version }}
verbose: true
# Tests that logki is buildable from distribution packages (this is precursor for pypi install).
# We limit the test to version 3.11 in order to have less clutter in Actions
build-from-dist:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.11"]
steps:
- uses: actions/checkout@v3
- name: Setup Python, Ubuntu and Python environment
uses: ./.github/workflows/actions/setup
with:
python-version: ${{ matrix.python-version }}
- name: Create tarball or wheel
run: |
pip3 install -q build
make release
- name: Install from dist (wheel)
run: |
pip3 install dist/*.whl
- name: Install from dist (tar.gz)
run: |
pip3 install dist/*.tar.gz
- name: Try running logki and getting help
run: |
logki --version
# Tests correctes of typing for all versions
typing:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.10", "3.11"]
steps:
- uses: actions/checkout@v3
- name: Setup Python, Ubuntu and Python environment
uses: ./.github/workflows/actions/setup
with:
python-version: ${{ matrix.python-version }}
- name: Check type correctness for Python ${{ matrix.python-version }} using Tox
run: |
tox -e typing
# Test linting only for the latest version of python
linting:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.11"]
steps:
- uses: actions/checkout@v3
- name: Setup Python, Ubuntu and Python environment
uses: ./.github/workflows/actions/setup
with:
python-version: ${{ matrix.python-version }}
- name: Check lint correctness for Python ${{ matrix.python-version }} using Tox
run: |
tox -e lint || true