Browse Source

ci: use tox from poetry

pull/396/head
Richard Nemeth 2 years ago
parent
commit
8496356103
  1. 5
      .github/workflows/daily.yaml
  2. 20
      .github/workflows/lint.yaml
  3. 9
      .github/workflows/publish.yaml

5
.github/workflows/daily.yaml

@ -21,7 +21,8 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install tox
python -m pip install poetry
poetry install
- name: Run tests
run: |
tox -e tests
poetry run tox -e tests

20
.github/workflows/lint.yaml

@ -24,10 +24,11 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install tox
python -m pip install poetry
poetry install
- name: Check linting, formatting
run: |
tox -e check
poetry run tox -e check
check-docs:
runs-on: ubuntu-latest
@ -43,10 +44,11 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install tox
python -m pip install poetry
poetry install
- name: Check documentation build
run: |
tox -e docs
poetry run tox -e docs
test:
runs-on: ubuntu-latest
@ -67,10 +69,11 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install tox
python -m pip install poetry
poetry install
- name: Run tests
run: |
tox -e tests
poetry run tox -e tests
- name: Keycloak logs
run: |
cat keycloak_test_logs.txt
@ -89,7 +92,8 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install tox
python -m pip install poetry
poetry install
- name: Run build
run: |
tox -e build
poetry run tox -e build

9
.github/workflows/publish.yaml

@ -19,23 +19,24 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install tox wheel twine
python -m pip install poetry
poetry install
- name: Apply the tag version
run: |
version=${{ github.ref_name }}
sed -Ei '/^version = /s|= "[0-9.]+"$|= "'${version:-1}'"|' pyproject.toml
- name: Run build
run: |
tox -e build
poetry run tox -e build
- name: Publish to PyPi
env:
TWINE_USERNAME: ${{ secrets.TWINE_USERNAME }}
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}
run: |
twine upload -u $TWINE_USERNAME -p $TWINE_PASSWORD dist/*
poetry run twine upload -u $TWINE_USERNAME -p $TWINE_PASSWORD dist/*
- name: Run changelog
run: |
tox -e changelog
poetry run tox -e changelog
- uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: "docs: changelog update"

Loading…
Cancel
Save