From 7bb9d643aac714f5710128842d522e4be48ca72d Mon Sep 17 00:00:00 2001 From: Richard Nemeth Date: Tue, 25 Oct 2022 07:10:31 +0000 Subject: [PATCH] style: lint --- .github/workflows/bump.yaml | 42 +++++------ .github/workflows/daily.yaml | 28 ++++---- .github/workflows/lint.yaml | 124 ++++++++++++++++----------------- .github/workflows/publish.yaml | 66 +++++++++--------- 4 files changed, 130 insertions(+), 130 deletions(-) diff --git a/.github/workflows/bump.yaml b/.github/workflows/bump.yaml index e562346..c623d74 100644 --- a/.github/workflows/bump.yaml +++ b/.github/workflows/bump.yaml @@ -2,8 +2,8 @@ name: Bump version on: workflow_run: - workflows: [ "Lint" ] - branches: [ master ] + workflows: ["Lint"] + branches: [master] types: - completed @@ -11,22 +11,22 @@ 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 }} + - 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 }} diff --git a/.github/workflows/daily.yaml b/.github/workflows/daily.yaml index 7ddc622..d53caf0 100644 --- a/.github/workflows/daily.yaml +++ b/.github/workflows/daily.yaml @@ -2,7 +2,7 @@ name: Daily check on: schedule: - - cron: '0 4 * * *' + - cron: "0 4 * * *" jobs: test: @@ -12,16 +12,16 @@ jobs: matrix: python-version: ["3.7", "3.8", "3.9", "3.10"] 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 tox - - name: Run tests - run: | - tox -e tests + - 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 tox + - name: Run tests + run: | + tox -e tests diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index 61534ac..e156b1b 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -2,51 +2,51 @@ name: Lint on: push: - branches: [ master ] + branches: [master] pull_request: - branches: [ master ] + branches: [master] jobs: check-commits: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: webiny/action-conventional-commits@v1.0.3 + - 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 tox - - name: Check linting, formatting - run: | - tox -e check + - 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 tox + - name: Check linting, formatting + run: | + tox -e check check-docs: runs-on: ubuntu-latest needs: - - check-commits - - check-linting + - 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 tox - - name: Check documentation build - run: | - tox -e docs + - 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 tox + - name: Check documentation build + run: | + tox -e docs test: runs-on: ubuntu-latest @@ -55,41 +55,41 @@ jobs: matrix: python-version: ["3.7", "3.8", "3.9", "3.10"] needs: - - check-commits - - check-linting + - 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 tox - - name: Run tests - run: | - tox -e tests - - name: Keycloak logs - run: | - cat keycloak_test_logs.txt + - 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 tox + - name: Run tests + run: | + tox -e tests + - name: Keycloak logs + run: | + cat keycloak_test_logs.txt build: runs-on: ubuntu-latest needs: - - test - - check-docs + - 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 tox - - name: Run build - run: | - tox -e build + - 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 tox + - name: Run build + run: | + tox -e build diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index 5c5f97c..c073b31 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -3,41 +3,41 @@ name: Publish on: push: tags: - - 'v*' + - "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 tox wheel twine - - 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 - - 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/* - - name: Run changelog - run: | - tox -e changelog - - uses: stefanzweifel/git-auto-commit-action@v4 - with: - commit_message: "docs: changelog update" - branch: master - file_pattern: CHANGELOG.md + - 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 tox wheel twine + - 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 + - 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/* + - name: Run changelog + run: | + tox -e changelog + - uses: stefanzweifel/git-auto-commit-action@v4 + with: + commit_message: "docs: changelog update" + branch: master + file_pattern: CHANGELOG.md