From 2e3f33997a58a041c73fc8e8b87871a0076cf1e1 Mon Sep 17 00:00:00 2001 From: Anthony Ruhier Date: Fri, 27 Oct 2023 02:54:29 +0200 Subject: [PATCH] GH Workflows: add python-black --- .github/workflows/python-black.yml | 33 ++++++++++++++++++++++++++++ .github/workflows/python-package.yml | 8 +++++-- 2 files changed, 39 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/python-black.yml diff --git a/.github/workflows/python-black.yml b/.github/workflows/python-black.yml new file mode 100644 index 0000000..045f50e --- /dev/null +++ b/.github/workflows/python-black.yml @@ -0,0 +1,33 @@ +# This workflow will install Python dependencies, run tests and lint with a variety of Python versions +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python + +name: Python black + +on: + push: + branches: [ "master" ] + pull_request: + branches: [ "master" ] + +jobs: + build: + + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + python-version: ["3.11"] + + steps: + - uses: actions/checkout@v3 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v3 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + python -m pip install --upgrade pip + python -m pip install black + - name: Black + run: | + black --check virt_backup tests diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 9254f66..f1ae614 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -31,6 +31,10 @@ jobs: if [ -f requirements.txt ]; then pip install -r requirements.txt; fi sudo apt install python3-libvirt libvirt-dev python -m pip install tox tox-gh-actions - - name: Tox + - name: Tox min run: | - tox + TOXENV=min tox + + - name: Tox full + run: | + TOXENV=full tox