Skip to content

move black and isort configuration to pyproject.toml #288

move black and isort configuration to pyproject.toml

move black and isort configuration to pyproject.toml #288

Workflow file for this run

---
name: CI
on: # yamllint disable-line rule:truthy
- push
- pull_request
# Note: ca-certificates and git are needed for actions/checkout to use git
# which is needed for codecov/codecov-action.
jobs:
install:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
container:
- debian:bookworm-slim
- debian:testing-slim
- debian:unstable-slim
- ubuntu:jammy
- ubuntu:noble
- ubuntu:oracular
container:
image: ${{ matrix.container }}
options: --privileged
steps:
- name: Install dependencies
run: >
apt-get update &&
apt-get install --no-install-recommends --yes ca-certificates git
pandoc python3 python3-coverage python3-ruamel.yaml python3-setuptools
- uses: actions/checkout@v4
- name: Run build
run: python3 -m coverage run --branch setup.py build
- name: Run install
run: python3 -m coverage run -a --branch setup.py install
- name: Run clean
run: python3 -m coverage run -a --branch setup.py clean
- name: Coverage report
run: python3 -m coverage xml
- name: Install dependencies for Codecov
run: apt-get install --no-install-recommends --yes curl gpg gpg-agent
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
fail_ci_if_error: true
files: ./coverage.xml
token: ${{ secrets.CODECOV_TOKEN }}
unittest:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
container:
- debian:bookworm-slim
- debian:testing-slim
- debian:unstable-slim
- ubuntu:jammy
- ubuntu:noble
- ubuntu:oracular
container:
image: ${{ matrix.container }}
steps:
- name: Install dependencies
run: >
apt-get update &&
apt-get install --no-install-recommends --yes black ca-certificates
git isort pylint python3 python3-coverage python3-flake8
python3-ruamel.yaml shellcheck
- uses: actions/checkout@v4
- name: Run unit tests
run: |
python3 -m coverage run -m unittest discover -v
python3 -m coverage xml
- name: Install dependencies for Codecov
run: apt-get install --no-install-recommends --yes curl gpg gpg-agent
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
fail_ci_if_error: true
files: ./coverage.xml
token: ${{ secrets.CODECOV_TOKEN }}
system-testing:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
container:
- debian:testing-slim
- debian:unstable-slim
- ubuntu:jammy
- ubuntu:noble
- ubuntu:oracular
container:
image: ${{ matrix.container }}
options: --privileged
env:
DEBIAN_FRONTEND: noninteractive
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: >
apt-get update &&
apt-get install --no-install-recommends --yes debian-archive-keyring
diffoscope-minimal distro-info-data dpkg-dev mmdebstrap
python3-ruamel.yaml python3 squashfs-tools-ng ubuntu-keyring
- name: Run system-testing
run: ./system-testing
yamllint:
runs-on: ubuntu-latest
container:
image: debian:testing-slim
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: |
apt-get update
apt-get install --no-install-recommends --yes yamllint
- name: Run yamllint
run: |
yamllint .