Browse Source
[5729-python-keyloak] remove old github action workflows and update patch version of pyproject.toml
pull/585/head
[5729-python-keyloak] remove old github action workflows and update patch version of pyproject.toml
pull/585/head
5 changed files with 1 additions and 208 deletions
-
32.github/workflows/bump.yaml
-
99.github/workflows/lint.yaml
-
44.github/workflows/publish.yaml
-
32.github/workflows/run_tests.yml
-
2pyproject.toml
@ -1,32 +0,0 @@ |
|||||
name: Bump version |
|
||||
|
|
||||
on: |
|
||||
workflow_run: |
|
||||
workflows: ["Lint"] |
|
||||
branches: [master] |
|
||||
types: |
|
||||
- completed |
|
||||
|
|
||||
jobs: |
|
||||
tag-version: |
|
||||
runs-on: ubuntu-latest |
|
||||
steps: |
|
||||
- uses: actions/checkout@v3 |
|
||||
with: |
|
||||
token: ${{ secrets.PAT_TOKEN }} |
|
||||
- uses: actions/setup-node@v3 |
|
||||
with: |
|
||||
node-version: 18 |
|
||||
- name: determine-version |
|
||||
run: | |
|
||||
VERSION=$(npx semantic-release --branches master --dry-run | { grep -i 'the next release version is' || test $? = 1; } | sed -E 's/.* ([[:digit:].]+)$/\1/') |
|
||||
echo "VERSION=$VERSION" >> $GITHUB_ENV |
|
||||
id: version |
|
||||
- uses: rickstaa/action-create-tag@v1 |
|
||||
continue-on-error: true |
|
||||
env: |
|
||||
GITHUB_TOKEN: ${{ secrets.PAT_TOKEN }} |
|
||||
with: |
|
||||
tag: v${{ env.VERSION }} |
|
||||
message: "Releasing v${{ env.VERSION }}" |
|
||||
github_token: ${{ secrets.PAT_TOKEN }} |
|
@ -1,99 +0,0 @@ |
|||||
name: Lint |
|
||||
|
|
||||
on: |
|
||||
push: |
|
||||
branches: [master] |
|
||||
pull_request: |
|
||||
branches: [master] |
|
||||
|
|
||||
jobs: |
|
||||
check-commits: |
|
||||
runs-on: ubuntu-latest |
|
||||
steps: |
|
||||
- uses: actions/checkout@v3 |
|
||||
- uses: webiny/action-conventional-commits@v1.0.3 |
|
||||
|
|
||||
check-linting: |
|
||||
runs-on: ubuntu-latest |
|
||||
steps: |
|
||||
- uses: actions/checkout@v3 |
|
||||
- name: Set up Python 3.10 |
|
||||
uses: actions/setup-python@v3 |
|
||||
with: |
|
||||
python-version: "3.10" |
|
||||
- name: Install dependencies |
|
||||
run: | |
|
||||
python -m pip install --upgrade pip |
|
||||
python -m pip install poetry |
|
||||
poetry install |
|
||||
- name: Check linting, formatting |
|
||||
run: | |
|
||||
poetry run tox -e check |
|
||||
|
|
||||
check-docs: |
|
||||
runs-on: ubuntu-latest |
|
||||
needs: |
|
||||
- check-commits |
|
||||
- check-linting |
|
||||
steps: |
|
||||
- uses: actions/checkout@v3 |
|
||||
- name: Set up Python 3.10 |
|
||||
uses: actions/setup-python@v3 |
|
||||
with: |
|
||||
python-version: "3.10" |
|
||||
- name: Install dependencies |
|
||||
run: | |
|
||||
python -m pip install --upgrade pip |
|
||||
python -m pip install poetry |
|
||||
poetry install |
|
||||
- name: Check documentation build |
|
||||
run: | |
|
||||
poetry run tox -e docs |
|
||||
|
|
||||
test: |
|
||||
runs-on: ubuntu-latest |
|
||||
strategy: |
|
||||
fail-fast: false |
|
||||
matrix: |
|
||||
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"] |
|
||||
needs: |
|
||||
- check-commits |
|
||||
- check-linting |
|
||||
steps: |
|
||||
- uses: actions/checkout@v3 |
|
||||
- name: Set up Python ${{ matrix.python-version }} |
|
||||
uses: actions/setup-python@v3 |
|
||||
with: |
|
||||
python-version: ${{ matrix.python-version }} |
|
||||
- uses: docker-practice/actions-setup-docker@master |
|
||||
- name: Install dependencies |
|
||||
run: | |
|
||||
python -m pip install --upgrade pip |
|
||||
python -m pip install poetry |
|
||||
poetry install |
|
||||
- name: Run tests |
|
||||
run: | |
|
||||
poetry run tox -e tests |
|
||||
- name: Keycloak logs |
|
||||
run: | |
|
||||
cat keycloak_test_logs.txt |
|
||||
|
|
||||
build: |
|
||||
runs-on: ubuntu-latest |
|
||||
needs: |
|
||||
- test |
|
||||
- check-docs |
|
||||
steps: |
|
||||
- uses: actions/checkout@v3 |
|
||||
- name: Set up Python 3.10 |
|
||||
uses: actions/setup-python@v3 |
|
||||
with: |
|
||||
python-version: "3.10" |
|
||||
- name: Install dependencies |
|
||||
run: | |
|
||||
python -m pip install --upgrade pip |
|
||||
python -m pip install poetry |
|
||||
poetry install |
|
||||
- name: Run build |
|
||||
run: | |
|
||||
poetry run tox -e build |
|
@ -1,44 +0,0 @@ |
|||||
name: Publish |
|
||||
|
|
||||
on: |
|
||||
push: |
|
||||
tags: |
|
||||
- "v*" |
|
||||
|
|
||||
jobs: |
|
||||
publish: |
|
||||
runs-on: ubuntu-latest |
|
||||
steps: |
|
||||
- uses: actions/checkout@v3 |
|
||||
with: |
|
||||
fetch-depth: "0" |
|
||||
- name: Set up Python 3.10 |
|
||||
uses: actions/setup-python@v3 |
|
||||
with: |
|
||||
python-version: "3.10" |
|
||||
- name: Install dependencies |
|
||||
run: | |
|
||||
python -m pip install --upgrade pip |
|
||||
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: | |
|
||||
poetry run tox -e build |
|
||||
- name: Publish to PyPi |
|
||||
env: |
|
||||
TWINE_USERNAME: ${{ secrets.TWINE_USERNAME }} |
|
||||
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }} |
|
||||
run: | |
|
||||
poetry run twine upload -u $TWINE_USERNAME -p $TWINE_PASSWORD dist/* |
|
||||
- name: Run changelog |
|
||||
run: | |
|
||||
poetry run tox -e changelog |
|
||||
- uses: stefanzweifel/git-auto-commit-action@v4 |
|
||||
with: |
|
||||
commit_message: "docs: changelog update" |
|
||||
branch: master |
|
||||
file_pattern: CHANGELOG.md |
|
@ -1,32 +0,0 @@ |
|||||
name: Run Tests |
|
||||
|
|
||||
on: |
|
||||
push: |
|
||||
branches: |
|
||||
- master |
|
||||
pull_request: |
|
||||
branches: |
|
||||
- master |
|
||||
|
|
||||
jobs: |
|
||||
test: |
|
||||
runs-on: ubuntu-latest |
|
||||
strategy: |
|
||||
fail-fast: false |
|
||||
matrix: |
|
||||
python-version: ["3.7", "3.8", "3.9", "3.10", "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 }} |
|
||||
- uses: docker-practice/actions-setup-docker@master |
|
||||
- name: Install dependencies |
|
||||
run: | |
|
||||
python -m pip install --upgrade pip |
|
||||
python -m pip install poetry |
|
||||
poetry install |
|
||||
- name: Run tests |
|
||||
run: | |
|
||||
poetry run tox -e tests |
|
Write
Preview
Loading…
Cancel
Save
Reference in new issue