Skip to content

Commit ede24fd

Browse files
Updated files with 'repo_helper'. (#6)
Co-authored-by: repo-helper[bot] <74742576+repo-helper[bot]@users.noreply.github.com>
1 parent d38dba5 commit ede24fd

File tree

12 files changed

+138
-59
lines changed

12 files changed

+138
-59
lines changed

.github/dependabot.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# This file is managed by 'repo_helper'. Don't edit it directly.
2+
---
3+
version: 2
4+
updates:
5+
- package-ecosystem: pip
6+
directory: /
7+
schedule:
8+
interval: weekly
9+
reviewers:
10+
- domdfcoding

.github/workflows/flake8.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,7 @@ jobs:
2626
python -VV
2727
python -m site
2828
python -m pip install --upgrade pip setuptools wheel
29-
python -m pip install flake8-prettycount
30-
python -m pip install .
29+
python -m pip install tox
3130
3231
- name: "Run Flake8"
33-
run: "python -m flake8_prettycount flake8_github_action --format github"
32+
run: "python -m tox -e lint -- --format github"

.github/workflows/mypy.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# This file is managed by 'repo_helper'. Don't edit it directly.
2+
---
3+
name: mypy
4+
5+
on:
6+
push:
7+
pull_request:
8+
branches: ["master"]
9+
10+
jobs:
11+
Run:
12+
name: "mypy / ${{ matrix.os }}"
13+
runs-on: ${{ matrix.os }}
14+
15+
strategy:
16+
matrix:
17+
os: [ubuntu-latest, windows-latest, macos-latest]
18+
fail-fast: false
19+
20+
steps:
21+
- name: Checkout 🛎️
22+
uses: "actions/checkout@v2"
23+
24+
- name: Setup Python 🐍
25+
uses: "actions/setup-python@v2"
26+
with:
27+
python-version: "3.6"
28+
29+
- name: Install dependencies 🔧
30+
run: |
31+
python -VV
32+
python -m site
33+
python -m pip install --upgrade pip setuptools wheel
34+
python -m pip install tox
35+
36+
- name: "Run mypy"
37+
run: "python -m tox -e mypy"

.github/workflows/octocheese.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
name: "GitHub Releases"
55
on:
66
push:
7+
branches: ["master"]
78
schedule:
89
- cron: 0 12 * * 2,4,6
910

.github/workflows/python_ci.yml

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# This file is managed by 'repo_helper'. Don't edit it directly.
22
---
3-
name: Windows Tests
3+
name: Windows
44

55
on:
66
push:
@@ -9,15 +9,20 @@ on:
99

1010
jobs:
1111
tests:
12-
name: "Python ${{ matrix.python-version }}"
12+
name: "windows-2019 / Python ${{ matrix.config.python-version }}"
1313
runs-on: "windows-2019"
14+
continue-on-error: ${{ matrix.config.experimental }}
1415
env:
1516
USING_COVERAGE: '3.6,3.7,3.8,3.9'
1617

1718
strategy:
1819
fail-fast: False
1920
matrix:
20-
python-version: ["3.6","3.7","3.8","3.9"]
21+
config:
22+
- {python-version: "3.6", testenvs: "py36,build", experimental: False}
23+
- {python-version: "3.7", testenvs: "py37,build", experimental: False}
24+
- {python-version: "3.8", testenvs: "py38,build", experimental: False}
25+
- {python-version: "3.9", testenvs: "py39,build", experimental: False}
2126

2227
steps:
2328
- name: Checkout 🛎️
@@ -26,14 +31,14 @@ jobs:
2631
- name: Setup Python 🐍
2732
uses: "actions/setup-python@v2"
2833
with:
29-
python-version: "${{ matrix.python-version }}"
34+
python-version: "${{ matrix.config.python-version }}"
3035

3136
- name: Install dependencies 🔧
3237
run: |
3338
python -VV
3439
python -m site
3540
python -m pip install --upgrade pip setuptools wheel
36-
python -m pip install --upgrade tox tox-gh-actions virtualenv
41+
python -m pip install --upgrade tox virtualenv
3742
38-
- name: "Run Tests for Python ${{ matrix.python-version }}"
39-
run: "python -m tox"
43+
- name: "Run Tests for Python ${{ matrix.config.python-version }}"
44+
run: python -m tox -e "${{ matrix.config.testenvs }}"

.github/workflows/python_ci_linux.yml

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# This file is managed by 'repo_helper'. Don't edit it directly.
22
---
3-
name: Linux Tests
3+
name: Linux
44

55
on:
66
push:
@@ -9,15 +9,20 @@ on:
99

1010
jobs:
1111
tests:
12-
name: "Python ${{ matrix.python-version }}"
13-
runs-on: "ubuntu-18.04"
12+
name: "ubuntu-20.04 / Python ${{ matrix.config.python-version }}"
13+
runs-on: "ubuntu-20.04"
14+
continue-on-error: ${{ matrix.config.experimental }}
1415
env:
1516
USING_COVERAGE: '3.6,3.7,3.8,3.9'
1617

1718
strategy:
1819
fail-fast: False
1920
matrix:
20-
python-version: ["3.6","3.7","3.8","3.9"]
21+
config:
22+
- {python-version: "3.6", testenvs: "py36,build", experimental: False}
23+
- {python-version: "3.7", testenvs: "py37,build", experimental: False}
24+
- {python-version: "3.8", testenvs: "py38,build", experimental: False}
25+
- {python-version: "3.9", testenvs: "py39,build", experimental: False}
2126

2227
steps:
2328
- name: Checkout 🛎️
@@ -26,44 +31,48 @@ jobs:
2631
- name: Setup Python 🐍
2732
uses: "actions/setup-python@v2"
2833
with:
29-
python-version: "${{ matrix.python-version }}"
34+
python-version: "${{ matrix.config.python-version }}"
3035

3136
- name: Install dependencies 🔧
3237
run: |
3338
python -VV
3439
python -m site
3540
python -m pip install --upgrade pip setuptools wheel
36-
python -m pip install --upgrade tox tox-gh-actions virtualenv
41+
python -m pip install --upgrade tox virtualenv
3742
38-
- name: "Run Tests for Python ${{ matrix.python-version }}"
39-
run: "python -m tox"
43+
- name: "Run Tests for Python ${{ matrix.config.python-version }}"
44+
run: python -m tox -e "${{ matrix.config.testenvs }}"
4045

4146

4247

4348
Deploy:
4449
needs: tests
4550

46-
runs-on: "ubuntu-18.04"
51+
runs-on: "ubuntu-20.04"
4752
steps:
4853
- name: Checkout 🛎️
4954
uses: "actions/checkout@v2"
55+
if: startsWith(github.ref, 'refs/tags/')
5056

5157
- name: Setup Python 🐍
5258
uses: "actions/setup-python@v2"
5359
with:
5460
python-version: 3.8
61+
if: startsWith(github.ref, 'refs/tags/')
5562

5663
- name: Install dependencies 🔧
5764
run: |
5865
python -m pip install --upgrade pip setuptools wheel
5966
python -m pip install --upgrade tox
67+
if: startsWith(github.ref, 'refs/tags/')
6068

6169
- name: Build distributions 📦
6270
run: |
6371
tox -e build
6472
73+
if: startsWith(github.ref, 'refs/tags/')
6574

66-
- name: Upload distribution 📦 to PyPI
75+
- name: Upload distribution to PyPI 🚀
6776
if: startsWith(github.ref, 'refs/tags/')
6877
uses: pypa/gh-action-pypi-publish@master
6978
with:

.github/workflows/python_ci_macos.yml

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# This file is managed by 'repo_helper'. Don't edit it directly.
22
---
3-
name: macOS Tests
3+
name: macOS
44

55
on:
66
push:
@@ -9,15 +9,20 @@ on:
99

1010
jobs:
1111
tests:
12-
name: "Python ${{ matrix.python-version }}"
12+
name: "macos-latest / Python ${{ matrix.config.python-version }}"
1313
runs-on: "macos-latest"
14+
continue-on-error: ${{ matrix.config.experimental }}
1415
env:
1516
USING_COVERAGE: '3.6,3.7,3.8,3.9'
1617

1718
strategy:
1819
fail-fast: False
1920
matrix:
20-
python-version: ["3.6","3.7","3.8","3.9"]
21+
config:
22+
- {python-version: "3.6", testenvs: "py36,build", experimental: False}
23+
- {python-version: "3.7", testenvs: "py37,build", experimental: False}
24+
- {python-version: "3.8", testenvs: "py38,build", experimental: False}
25+
- {python-version: "3.9", testenvs: "py39,build", experimental: False}
2126

2227
steps:
2328
- name: Checkout 🛎️
@@ -26,14 +31,14 @@ jobs:
2631
- name: Setup Python 🐍
2732
uses: "actions/setup-python@v2"
2833
with:
29-
python-version: "${{ matrix.python-version }}"
34+
python-version: "${{ matrix.config.python-version }}"
3035

3136
- name: Install dependencies 🔧
3237
run: |
3338
python -VV
3439
python -m site
3540
python -m pip install --upgrade pip setuptools wheel
36-
python -m pip install --upgrade tox tox-gh-actions virtualenv
41+
python -m pip install --upgrade tox virtualenv
3742
38-
- name: "Run Tests for Python ${{ matrix.python-version }}"
39-
run: "python -m tox"
43+
- name: "Run Tests for Python ${{ matrix.config.python-version }}"
44+
run: python -m tox -e "${{ matrix.config.testenvs }}"

.pre-commit-config.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,9 @@ repos:
4444
rev: v1.7.0
4545
hooks:
4646
- id: python-no-eval
47+
- id: rst-backticks
48+
- id: rst-directive-colons
49+
- id: rst-inline-touching-normal
4750

4851
- repo: https://github.com/asottile/pyupgrade
4952
rev: v2.7.4

README.rst

Lines changed: 22 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -16,28 +16,36 @@ flake8-github-actions
1616
:widths: 10 90
1717

1818
* - Tests
19-
- |travis| |actions_windows| |actions_macos| |codefactor| |pre_commit_ci|
19+
- |actions_linux| |actions_windows| |actions_macos|
2020
* - PyPI
2121
- |pypi-version| |supported-versions| |supported-implementations| |wheel|
2222
* - Activity
23-
- |commits-latest| |commits-since| |maintained|
23+
- |commits-latest| |commits-since| |maintained| |pypi-downloads|
24+
* - QA
25+
- |codefactor| |actions_flake8| |actions_mypy| |pre_commit_ci|
2426
* - Other
25-
- |license| |language| |requires| |pre_commit|
27+
- |license| |language| |requires|
2628

27-
28-
29-
.. |travis| image:: https://github.com/domdfcoding/flake8-github-actions/workflows/Linux%20Tests/badge.svg
30-
:target: https://github.com/domdfcoding/flake8-github-actions/actions?query=workflow%3A%22Linux+Tests%22
29+
.. |actions_linux| image:: https://github.com/domdfcoding/flake8-github-actions/workflows/Linux/badge.svg
30+
:target: https://github.com/domdfcoding/flake8-github-actions/actions?query=workflow%3A%22Linux%22
3131
:alt: Linux Test Status
3232

33-
.. |actions_windows| image:: https://github.com/domdfcoding/flake8-github-actions/workflows/Windows%20Tests/badge.svg
34-
:target: https://github.com/domdfcoding/flake8-github-actions/actions?query=workflow%3A%22Windows+Tests%22
33+
.. |actions_windows| image:: https://github.com/domdfcoding/flake8-github-actions/workflows/Windows/badge.svg
34+
:target: https://github.com/domdfcoding/flake8-github-actions/actions?query=workflow%3A%22Windows%22
3535
:alt: Windows Test Status
3636

37-
.. |actions_macos| image:: https://github.com/domdfcoding/flake8-github-actions/workflows/macOS%20Tests/badge.svg
38-
:target: https://github.com/domdfcoding/flake8-github-actions/actions?query=workflow%3A%22macOS+Tests%22
37+
.. |actions_macos| image:: https://github.com/domdfcoding/flake8-github-actions/workflows/macOS/badge.svg
38+
:target: https://github.com/domdfcoding/flake8-github-actions/actions?query=workflow%3A%22macOS%22
3939
:alt: macOS Test Status
4040

41+
.. |actions_flake8| image:: https://github.com/domdfcoding/flake8-github-actions/workflows/Flake8/badge.svg
42+
:target: https://github.com/domdfcoding/flake8-github-actions/actions?query=workflow%3A%22Flake8%22
43+
:alt: Flake8 Status
44+
45+
.. |actions_mypy| image:: https://github.com/domdfcoding/flake8-github-actions/workflows/mypy/badge.svg
46+
:target: https://github.com/domdfcoding/flake8-github-actions/actions?query=workflow%3A%22mypy%22
47+
:alt: mypy status
48+
4149
.. |requires| image:: https://requires.io/github/domdfcoding/flake8-github-actions/requirements.svg?branch=master
4250
:target: https://requires.io/github/domdfcoding/flake8-github-actions/requirements/?branch=master
4351
:alt: Requirements Status
@@ -80,9 +88,9 @@ flake8-github-actions
8088
.. |maintained| image:: https://img.shields.io/maintenance/yes/2020
8189
:alt: Maintenance
8290

83-
.. |pre_commit| image:: https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white
84-
:target: https://github.com/pre-commit/pre-commit
85-
:alt: pre-commit
91+
.. |pypi-downloads| image:: https://img.shields.io/pypi/dm/flake8-github-actions
92+
:target: https://pypi.org/project/flake8-github-actions/
93+
:alt: PyPI - Downloads
8694

8795
.. |pre_commit_ci| image:: https://results.pre-commit.ci/badge/github/domdfcoding/flake8-github-actions/master.svg
8896
:target: https://results.pre-commit.ci/latest/github/domdfcoding/flake8-github-actions/master

flake8_github_actions/__init__.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,17 @@
4646

4747

4848
class GitHubFormatter(BaseFormatter):
49+
"""
50+
Custom Flake8 formatter for GitHub actions.
51+
"""
4952

5053
def write_line(self, line):
5154
"""
5255
Override write for convenience.
5356
"""
5457
self.write(line, None)
5558

56-
def start(self):
59+
def start(self): # noqa: D102
5760
super().start()
5861
self.files_reported_count = 0
5962

@@ -71,7 +74,7 @@ def finished(self, filename):
7174

7275
self.files_reported_count += 1
7376

74-
def format(self, violation):
77+
def format(self, violation): # noqa: A003 # pylint: disable=redefined-builtin
7578
"""
7679
Format a violation.
7780
"""

0 commit comments

Comments
 (0)