Release initial version of logki #3
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
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 | |