Skip to content

Commit

Permalink
[repo-helper] Configuration Update (#32)
Browse files Browse the repository at this point in the history
* Updated files with 'repo_helper'.

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: repo-helper[bot] <74742576+repo-helper[bot]@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
repo-helper[bot] and pre-commit-ci[bot] committed Mar 12, 2024
1 parent aa547fd commit f1d2bab
Show file tree
Hide file tree
Showing 22 changed files with 320 additions and 128 deletions.
4 changes: 2 additions & 2 deletions .bumpversion.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ tag = True

[bumpversion:file:repo_helper.yml]

[bumpversion:file:__pkginfo__.py]

[bumpversion:file:README.rst]

[bumpversion:file:pytest_regressions_stubs/__init__.py]

[bumpversion:file:pyproject.toml]
search = version = "{current_version}"
replace = version = "{new_version}"
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ If possible, please include a small, self-contained reproduction.
* pytest-regressions-stubs:

## Installation source
<!-- e.g. Github repository, Github Releases, PyPI/pip, Anaconda/conda -->
<!-- e.g. GitHub repository, GitHub Releases, PyPI/pip, Anaconda/conda -->


## Other Additional Information:
Expand Down
1 change: 1 addition & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@ updates:
directory: /
schedule:
interval: weekly
open-pull-requests-limit: 0
reviewers:
- domdfcoding
28 changes: 28 additions & 0 deletions .github/milestones.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/usr/bin/env python

# stdlib
import os
import sys

# 3rd party
from github3 import GitHub
from github3.repos import Repository
from packaging.version import InvalidVersion, Version

latest_tag = os.environ["GITHUB_REF_NAME"]

try:
current_version = Version(latest_tag)
except InvalidVersion:
sys.exit()

gh: GitHub = GitHub(token=os.environ["GITHUB_TOKEN"])
repo: Repository = gh.repository(*os.environ["GITHUB_REPOSITORY"].split('/', 1))

for milestone in repo.milestones(state="open"):
try:
milestone_version = Version(milestone.title)
except InvalidVersion:
continue
if milestone_version == current_version:
sys.exit(not milestone.update(state="closed"))
12 changes: 6 additions & 6 deletions .github/stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ daysUntilStale: 180

# Number of days of inactivity before an Issue or Pull Request with the stale label is closed.
# Set to false to disable. If disabled, issues still need to be closed manually, but will remain marked as stale.
daysUntilClose: 180
daysUntilClose: false

# Only issues or pull requests with all of these labels are check if stale. Defaults to `[]` (disabled)
onlyLabels: []
Expand All @@ -28,13 +28,13 @@ exemptMilestones: false
exemptAssignees: false

# Label to use when marking as stale
staleLabel: wontfix
staleLabel: stale

# Comment to post when marking as stale. Set to `false` to disable
markComment: >
This issue has been automatically marked as stale because it has not had
recent activity. It will be closed if no further activity occurs. Thank you
for your contributions.
markComment: false
# This issue has been automatically marked as stale because it has not had
# recent activity. It will be closed if no further activity occurs. Thank you
# for your contributions.

# Comment to post when removing the stale label.
# unmarkComment: >
Expand Down
14 changes: 0 additions & 14 deletions .github/workflows/cleanup.yml

This file was deleted.

30 changes: 25 additions & 5 deletions .github/workflows/flake8.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,47 @@ name: Flake8

on:
push:
branches-ignore:
- 'repo-helper-update'
- 'pre-commit-ci-update-config'
- 'imgbot'
pull_request:

permissions:
contents: read

jobs:
Run:
name: "Flake8"
runs-on: "ubuntu-18.04"
runs-on: "ubuntu-20.04"

steps:
- name: Checkout 🛎️
uses: "actions/checkout@v2"
uses: "actions/checkout@v4"

- name: Check for changed files
uses: dorny/paths-filter@v2
id: changes
with:
list-files: "json"
filters: |
code:
- '!(doc-source/**|CONTRIBUTING.rst|.imgbotconfig|.pre-commit-config.yaml|.pylintrc|.readthedocs.yml)'
- name: Setup Python 🐍
uses: "actions/setup-python@v2"
if: steps.changes.outputs.code == 'true'
uses: "actions/setup-python@v5"
with:
python-version: "3.8"

- name: Install dependencies 🔧
if: steps.changes.outputs.code == 'true'
run: |
python -VV
python -m site
python -m pip install --upgrade pip setuptools wheel
python -m pip install tox
python -m pip install tox~=3.0
- name: "Run Flake8"
run: "python -m tox -e lint -- --format github"
if: steps.changes.outputs.code == 'true'
run: "python -m tox -e lint -s false -- --format github"
29 changes: 24 additions & 5 deletions .github/workflows/mypy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@ name: mypy

on:
push:
branches-ignore:
- 'repo-helper-update'
- 'pre-commit-ci-update-config'
- 'imgbot'
pull_request:

permissions:
contents: read

jobs:
Run:
Expand All @@ -17,19 +25,30 @@ jobs:

steps:
- name: Checkout 🛎️
uses: "actions/checkout@v2"
uses: "actions/checkout@v4"

- name: Check for changed files
uses: dorny/paths-filter@v2
id: changes
with:
list-files: "json"
filters: |
code:
- '!(doc-source/**|CONTRIBUTING.rst|.imgbotconfig|.pre-commit-config.yaml|.pylintrc|.readthedocs.yml)'
- name: Setup Python 🐍
uses: "actions/setup-python@v2"
if: steps.changes.outputs.code == 'true'
uses: "actions/setup-python@v5"
with:
python-version: "3.6"
python-version: "3.8"

- name: Install dependencies 🔧
run: |
python -VV
python -m site
python -m pip install --upgrade pip setuptools wheel
python -m pip install --upgrade tox virtualenv
python -m pip install --upgrade tox~=3.0 virtualenv!=20.16.0
- name: "Run mypy"
run: "python -m tox -e mypy"
if: steps.changes.outputs.code == 'true'
run: "python -m tox -e mypy -s false"
33 changes: 29 additions & 4 deletions .github/workflows/python_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,17 @@ name: Windows

on:
push:
branches-ignore:
- 'repo-helper-update'
- 'pre-commit-ci-update-config'
- 'imgbot'

pull_request:

permissions:
actions: write
issues: write
contents: read

jobs:
tests:
Expand All @@ -23,19 +34,33 @@ jobs:

steps:
- name: Checkout 🛎️
uses: "actions/checkout@v2"
uses: "actions/checkout@v4"

- name: Check for changed files
if: startsWith(github.ref, 'refs/tags/') != true
uses: dorny/paths-filter@v2
id: changes
with:
list-files: "json"
filters: |
code:
- '!(doc-source/**|CONTRIBUTING.rst|.imgbotconfig|.pre-commit-config.yaml|.pylintrc|.readthedocs.yml)'
- name: Setup Python 🐍
uses: "actions/setup-python@v2"
id: setup-python
if: ${{ steps.changes.outputs.code == 'true' || steps.changes.outcome == 'skipped' }}
uses: "actions/setup-python@v5"
with:
python-version: "${{ matrix.config.python-version }}"

- name: Install dependencies 🔧
if: steps.setup-python.outcome == 'success'
run: |
python -VV
python -m site
python -m pip install --upgrade pip setuptools wheel
python -m pip install --upgrade tox virtualenv
python -m pip install --upgrade tox~=3.0 virtualenv!=20.16.0
- name: "Run Tests for Python ${{ matrix.config.python-version }}"
run: python -m tox -e "${{ matrix.config.testenvs }}"
if: steps.setup-python.outcome == 'success'
run: python -m tox -e "${{ matrix.config.testenvs }}" -s false
34 changes: 30 additions & 4 deletions .github/workflows/python_ci_linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,18 @@ name: Linux

on:
push:
branches-ignore:
- 'repo-helper-update'
- 'pre-commit-ci-update-config'
- 'imgbot'
tags:
- '*'
pull_request:

permissions:
actions: write
issues: write
contents: read

jobs:
tests:
Expand All @@ -23,20 +35,34 @@ jobs:

steps:
- name: Checkout 🛎️
uses: "actions/checkout@v2"
uses: "actions/checkout@v4"

- name: Check for changed files
if: startsWith(github.ref, 'refs/tags/') != true
uses: dorny/paths-filter@v2
id: changes
with:
list-files: "json"
filters: |
code:
- '!(doc-source/**|CONTRIBUTING.rst|.imgbotconfig|.pre-commit-config.yaml|.pylintrc|.readthedocs.yml)'
- name: Setup Python 🐍
uses: "actions/setup-python@v2"
id: setup-python
if: ${{ steps.changes.outputs.code == 'true' || steps.changes.outcome == 'skipped' }}
uses: "actions/setup-python@v5"
with:
python-version: "${{ matrix.config.python-version }}"

- name: Install dependencies 🔧
if: steps.setup-python.outcome == 'success'
run: |
python -VV
python -m site
python -m pip install --upgrade pip setuptools wheel
python -m pip install --upgrade tox virtualenv
python -m pip install --upgrade tox~=3.0 virtualenv!=20.16.0
python -m pip install --upgrade coverage_pyver_pragma
- name: "Run Tests for Python ${{ matrix.config.python-version }}"
run: python -m tox -e "${{ matrix.config.testenvs }}"
if: steps.setup-python.outcome == 'success'
run: python -m tox -e "${{ matrix.config.testenvs }}" -s false
33 changes: 29 additions & 4 deletions .github/workflows/python_ci_macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,17 @@ name: macOS

on:
push:
branches-ignore:
- 'repo-helper-update'
- 'pre-commit-ci-update-config'
- 'imgbot'

pull_request:

permissions:
actions: write
issues: write
contents: read

jobs:
tests:
Expand All @@ -23,19 +34,33 @@ jobs:

steps:
- name: Checkout 🛎️
uses: "actions/checkout@v2"
uses: "actions/checkout@v4"

- name: Check for changed files
if: startsWith(github.ref, 'refs/tags/') != true
uses: dorny/paths-filter@v2
id: changes
with:
list-files: "json"
filters: |
code:
- '!(doc-source/**|CONTRIBUTING.rst|.imgbotconfig|.pre-commit-config.yaml|.pylintrc|.readthedocs.yml)'
- name: Setup Python 🐍
uses: "actions/setup-python@v2"
id: setup-python
if: ${{ steps.changes.outputs.code == 'true' || steps.changes.outcome == 'skipped' }}
uses: "actions/setup-python@v5"
with:
python-version: "${{ matrix.config.python-version }}"

- name: Install dependencies 🔧
if: steps.setup-python.outcome == 'success'
run: |
python -VV
python -m site
python -m pip install --upgrade pip setuptools wheel
python -m pip install --upgrade tox virtualenv
python -m pip install --upgrade tox~=3.0 virtualenv!=20.16.0
- name: "Run Tests for Python ${{ matrix.config.python-version }}"
run: python -m tox -e "${{ matrix.config.testenvs }}"
if: steps.setup-python.outcome == 'success'
run: python -m tox -e "${{ matrix.config.testenvs }}" -s false
Loading

0 comments on commit f1d2bab

Please sign in to comment.