Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Nov 15, 2023
1 parent f8a6ed8 commit 5b137e2
Show file tree
Hide file tree
Showing 9 changed files with 89 additions and 94 deletions.
5 changes: 2 additions & 3 deletions .codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
# Validation check:
# $ curl --data-binary @.codecov.yml https://codecov.io/validate


# https://docs.codecov.io/docs/codecovyml-reference
codecov:
bot: "codecov-io"
Expand All @@ -12,7 +11,7 @@ codecov:
wait_for_ci: yes

coverage:
precision: 0 # 2 = xx.xx%, 0 = xx%
precision: 0 # 2 = xx.xx%, 0 = xx%
round: nearest # how coverage is rounded: down/up/nearest
range: 60...100 # custom range of coverage colors from red -> yellow -> green
status:
Expand Down Expand Up @@ -44,4 +43,4 @@ parsers:
comment:
layout: header, diff
require_changes: false
behavior: default # update if exists else create new
behavior: default # update if exists else create new
7 changes: 3 additions & 4 deletions .github/mergify.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
pull_request_rules:

- name: warn on conflicts
conditions:
- conflict
Expand All @@ -9,7 +8,7 @@ pull_request_rules:
# comment:
# message: This pull request is now in conflict... :(
label:
add: [ "has conflicts" ]
add: ["has conflicts"]

- name: resolved conflicts
conditions:
Expand All @@ -20,13 +19,13 @@ pull_request_rules:
- -closed
actions:
label:
remove: [ "has conflicts" ]
remove: ["has conflicts"]

- name: update PR
conditions:
- -conflict
- -draft # filter-out GH draft PRs
- base=master # apply only on master
- base=master # apply only on master
- -title~=(?i)wip # skip all PR that title contains “WIP” (ignoring case)
- "#approved-reviews-by>=1" # number of review approvals
actions:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci_install-pkg.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
name: Install pkg

# see: https://help.github.com/en/actions/reference/events-that-trigger-workflows
on: # Trigger the workflow on push or pull request, but only for the main branch
on: # Trigger the workflow on push or pull request, but only for the main branch
push: {}
pull_request:
branches: [ main ]
branches: [main]

jobs:
pkg-check:
Expand Down
90 changes: 44 additions & 46 deletions .github/workflows/ci_testing.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
name: CI testing

# see: https://help.github.com/en/actions/reference/events-that-trigger-workflows
on: # Trigger the workflow on push or pull request, but only for the main branch
on: # Trigger the workflow on push or pull request, but only for the main branch
push: {}
pull_request:
branches: [ main ]
branches: [main]

jobs:

pytester:
runs-on: ${{ matrix.os }}
strategy:
Expand All @@ -18,57 +17,56 @@ jobs:
# Timeout: https://stackoverflow.com/a/59076067/4521646
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Install requirements
run: |
pip install -r tests/requirements.txt
pip list
shell: bash
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Tests
run: |
phmdoctest README.md --outfile tests/test_readme.py
python -m pytest . -v --cov=deprecate --junitxml=junit/test-results-${{ runner.os }}-${{ matrix.python-version }}.xml
- name: Install requirements
run: |
pip install -r tests/requirements.txt
pip list
shell: bash

- name: Upload pytest test results
uses: actions/upload-artifact@v3
with:
name: pytest-results-${{ runner.os }}-${{ matrix.python-version }}
path: junit/test-results-${{ runner.os }}-${{ matrix.python-version }}.xml
if: failure()
- name: Tests
run: |
phmdoctest README.md --outfile tests/test_readme.py
python -m pytest . -v --cov=deprecate --junitxml=junit/test-results-${{ runner.os }}-${{ matrix.python-version }}.xml
- name: Statistics
if: success()
run: |
coverage report
coverage xml
- name: Upload pytest test results
uses: actions/upload-artifact@v3
with:
name: pytest-results-${{ runner.os }}-${{ matrix.python-version }}
path: junit/test-results-${{ runner.os }}-${{ matrix.python-version }}.xml
if: failure()

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
if: success()
continue-on-error: true
with:
# token: ${{ secrets.CODECOV_TOKEN }}
file: coverage.xml
flags: pytest,python${{ matrix.python-version }}
fail_ci_if_error: false
- name: Statistics
if: success()
run: |
coverage report
coverage xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
if: success()
continue-on-error: true
with:
# token: ${{ secrets.CODECOV_TOKEN }}
file: coverage.xml
flags: pytest,python${{ matrix.python-version }}
fail_ci_if_error: false

testing-guardian:
runs-on: ubuntu-latest
needs: pytester
if: always()
steps:
- run: echo "${{ needs.pytester.result }}"
- name: failing...
if: needs.pytester.result == 'failure'
run: exit 1
- name: cancelled or skipped...
if: contains(fromJSON('["cancelled", "skipped"]'), needs.pytester.result)
timeout-minutes: 1
run: sleep 90
- run: echo "${{ needs.pytester.result }}"
- name: failing...
if: needs.pytester.result == 'failure'
run: exit 1
- name: cancelled or skipped...
if: contains(fromJSON('["cancelled", "skipped"]'), needs.pytester.result)
timeout-minutes: 1
run: sleep 90
5 changes: 2 additions & 3 deletions .github/workflows/code-format.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
name: Code formatting

# see: https://help.github.com/en/actions/reference/events-that-trigger-workflows
on: # Trigger the workflow on push or pull request, but only for the main branch
on: # Trigger the workflow on push or pull request, but only for the main branch
push: {}
pull_request:
branches: [ main ]
branches: [main]

jobs:

typing-mypy:
runs-on: ubuntu-20.04
steps:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: "CodeQL"

on:
push:
branches: [ "main" ]
branches: ["main"]
pull_request:
branches: [ "main" ]
branches: ["main"]
schedule:
- cron: "10 10 * * 6"

Expand All @@ -20,7 +20,7 @@ jobs:
strategy:
fail-fast: false
matrix:
language: [ python ]
language: [python]

steps:
- name: Checkout
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/greetings.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
name: Greetings
# https://github.com/marketplace/actions/first-interaction

on: [issues] # pull_request
on: [issues] # pull_request

jobs:
greeting:
runs-on: ubuntu-latest
steps:
- uses: actions/first-interaction@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
issue-message: 'Hi! thanks for your contribution!, great first issue!'
pr-message: 'Hey thanks for the input! Please give us a bit of time to review it!'
- uses: actions/first-interaction@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
issue-message: "Hi! thanks for your contribution!, great first issue!"
pr-message: "Hey thanks for the input! Please give us a bit of time to review it!"
52 changes: 26 additions & 26 deletions .github/workflows/release-pypi.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: PyPI Release

# https://help.github.com/en/actions/reference/events-that-trigger-workflows
on: # Trigger the workflow on push or pull request, but only for the main branch
on: # Trigger the workflow on push or pull request, but only for the main branch
push:
branches: [ main ]
branches: [main]
release:
types: [published]

Expand All @@ -13,30 +13,30 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: 3.8
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: 3.8

- name: Install dependencies
run: python -m pip install build
- name: Build package
run: python -m build
- name: List package
run: ls -lh dist/
- name: Install dependencies
run: python -m pip install build
- name: Build package
run: python -m build
- name: List package
run: ls -lh dist/

# We do this, since failures on test.pypi aren't that bad
- name: Publish to Test PyPI
if: startsWith(github.event.ref, 'refs/tags') || github.event_name == 'release'
uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.test_pypi_password }}
repository_url: https://test.pypi.org/legacy/
# We do this, since failures on test.pypi aren't that bad
- name: Publish to Test PyPI
if: startsWith(github.event.ref, 'refs/tags') || github.event_name == 'release'
uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.test_pypi_password }}
repository_url: https://test.pypi.org/legacy/

- name: Publish distribution 📦 to PyPI
if: startsWith(github.event.ref, 'refs/tags') || github.event_name == 'release'
uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.pypi_password }}
- name: Publish distribution 📦 to PyPI
if: startsWith(github.event.ref, 'refs/tags') || github.event_name == 'release'
uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.pypi_password }}
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ default_language_version:

ci:
autofix_prs: true
autoupdate_commit_msg: '[pre-commit.ci] pre-commit suggestions'
autoupdate_commit_msg: "[pre-commit.ci] pre-commit suggestions"
autoupdate_schedule: quarterly
# submodules: true

Expand Down

0 comments on commit 5b137e2

Please sign in to comment.