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 - name: Install dependencies
run: | run: |
python -m pip install --upgrade pip python -m pip install --upgrade pip
python -m pip install tox
python -m pip install poetry
poetry install
- name: Run tests - name: Run tests
run: | run: |
tox -e tests
poetry run tox -e tests

20
.github/workflows/lint.yaml

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

9
.github/workflows/publish.yaml

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

Loading…
Cancel
Save