Skip to content

Commit 9c1f8fb

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

17 files changed

+221
-92
lines changed

.github/actions_build_conda.sh

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,9 @@ conda install conda-build
1515
conda install anaconda-client
1616
conda info -a
1717

18-
conda config --add channels domdfcoding || exit 1
19-
2018
conda config --add channels conda-forge || exit 1
19+
conda config --add channels domdfcoding || exit 1
2120

22-
conda build conda -c domdfcoding -c conda-forge --output-folder conda/dist --skip-existing
21+
conda build conda -c conda-forge -c domdfcoding --output-folder conda/dist --skip-existing
2322

2423
exit 0

.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/conda_ci.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,16 @@ jobs:
2929
python -m pip install --upgrade repo_helper
3030
# $CONDA is an environment variable pointing to the root of the miniconda directory
3131
$CONDA/bin/conda update -q conda
32-
33-
$CONDA/bin/conda config --add channels domdfcoding
32+
$CONDA/bin/conda install conda-build
3433
3534
$CONDA/bin/conda config --add channels conda-forge
36-
35+
$CONDA/bin/conda config --add channels domdfcoding
3736
3837
- name: "Build and install package"
3938
run: |
4039
# This mess is only necessary because conda won't fix it themselves
4140
# https://github.com/conda/conda/issues/1884
41+
4242
python -m repo_helper build --conda --out-dir conda-bld/noarch
43-
$CONDA/bin/conda install coverage_pyver_pragma -c local -y || exit 1
43+
$CONDA/bin/conda index ./conda-bld || exit 1
44+
$CONDA/bin/conda install -c file://$(pwd)/conda-bld coverage_pyver_pragma -y || exit 1

.github/workflows/flake8.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# This file is managed by 'repo_helper'. Don't edit it directly.
2+
---
3+
name: Flake8
4+
5+
on:
6+
push:
7+
pull_request:
8+
branches: ["master"]
9+
10+
jobs:
11+
Run:
12+
name: "Flake8"
13+
runs-on: "ubuntu-18.04"
14+
15+
steps:
16+
- name: Checkout 🛎️
17+
uses: "actions/checkout@v2"
18+
19+
- name: Setup Python 🐍
20+
uses: "actions/setup-python@v2"
21+
with:
22+
python-version: "3.8"
23+
24+
- name: Install dependencies 🔧
25+
run: |
26+
python -VV
27+
python -m site
28+
python -m pip install --upgrade pip setuptools wheel
29+
python -m pip install tox
30+
31+
- name: "Run Flake8"
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: 2 additions & 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

@@ -16,3 +17,4 @@ jobs:
1617
pypi_name: "coverage_pyver_pragma"
1718
env:
1819
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
20+
if: startsWith(github.ref, 'refs/tags/') != true

.github/workflows/python_ci.yml

Lines changed: 14 additions & 8 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,30 +9,36 @@ 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 🛎️
2429
uses: "actions/checkout@v2"
30+
2531
- name: Setup Python 🐍
2632
uses: "actions/setup-python@v2"
2733
with:
28-
python-version: "${{ matrix.python-version }}"
34+
python-version: "${{ matrix.config.python-version }}"
35+
2936
- name: Install dependencies 🔧
3037
run: |
3138
python -VV
3239
python -m site
3340
python -m pip install --upgrade pip setuptools wheel
34-
python -m pip install --upgrade tox tox-gh-actions virtualenv
35-
41+
python -m pip install --upgrade tox virtualenv
3642
37-
- name: "Run Tests for Python ${{ matrix.python-version }}"
38-
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: 31 additions & 19 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,45 +9,53 @@ 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:
15-
USING_COVERAGE: '3.6,3.7,3.8,3.9,pypy3'
16+
USING_COVERAGE: '3.6,3.7,3.8,3.9,pypy-3.6'
1617

1718
strategy:
1819
fail-fast: False
1920
matrix:
20-
python-version: ["3.6","3.7","3.8","3.9","pypy3"]
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}
26+
- {python-version: "pypy-3.6", testenvs: "pypy3,build", experimental: False}
2127

2228
steps:
2329
- name: Checkout 🛎️
2430
uses: "actions/checkout@v2"
31+
2532
- name: Setup Python 🐍
2633
uses: "actions/setup-python@v2"
2734
with:
28-
python-version: "${{ matrix.python-version }}"
35+
python-version: "${{ matrix.config.python-version }}"
36+
2937
- name: Install dependencies 🔧
3038
run: |
3139
python -VV
3240
python -m site
3341
python -m pip install --upgrade pip setuptools wheel
34-
python -m pip install --upgrade tox tox-gh-actions virtualenv
42+
python -m pip install --upgrade tox virtualenv
3543
python -m pip install --upgrade coverage_pyver_pragma
3644
37-
- name: "Run Tests for Python ${{ matrix.python-version }}"
38-
run: "python -m tox"
45+
- name: "Run Tests for Python ${{ matrix.config.python-version }}"
46+
run: python -m tox -e "${{ matrix.config.testenvs }}"
3947

4048

41-
- name: "Upload Coverage"
49+
- name: "Upload Coverage 🚀"
4250
uses: actions/upload-artifact@v2
4351
with:
44-
name: "coverage-${{ matrix.python-version }}"
52+
name: "coverage-${{ matrix.config.python-version }}"
4553
path: .coverage
4654

4755

4856
Coverage:
4957
needs: tests
50-
runs-on: "ubuntu-18.04"
58+
runs-on: "ubuntu-20.04"
5159
steps:
5260
- name: Checkout 🛎️
5361
uses: "actions/checkout@v2"
@@ -62,7 +70,7 @@ jobs:
6270
python -m pip install --upgrade pip setuptools wheel
6371
python -m pip install --upgrade coveralls coverage_pyver_pragma
6472
65-
- name: "Download Coverage"
73+
- name: "Download Coverage 🪂"
6674
uses: actions/download-artifact@v2
6775
with:
6876
path: coverage
@@ -71,12 +79,12 @@ jobs:
7179
run: ls -R
7280
working-directory: coverage
7381

74-
- name: Combine Coverage
82+
- name: Combine Coverage 👷
7583
run: |
7684
shopt -s globstar
7785
python -m coverage combine coverage/**/.coverage
7886
79-
- name: "Upload Combined Coverage Artefact"
87+
- name: "Upload Combined Coverage Artefact 🚀"
8088
uses: actions/upload-artifact@v2
8189
with:
8290
name: "combined-coverage"
@@ -91,27 +99,31 @@ jobs:
9199
Deploy:
92100
needs: tests
93101

94-
runs-on: "ubuntu-18.04"
102+
runs-on: "ubuntu-20.04"
95103
steps:
96104
- name: Checkout 🛎️
97105
uses: "actions/checkout@v2"
106+
if: startsWith(github.ref, 'refs/tags/')
98107

99108
- name: Setup Python 🐍
100109
uses: "actions/setup-python@v2"
101110
with:
102111
python-version: 3.8
112+
if: startsWith(github.ref, 'refs/tags/')
103113

104114
- name: Install dependencies 🔧
105115
run: |
106116
python -m pip install --upgrade pip setuptools wheel
107117
python -m pip install --upgrade tox
118+
if: startsWith(github.ref, 'refs/tags/')
108119

109120
- name: Build distributions 📦
110121
run: |
111122
tox -e build
112123
124+
if: startsWith(github.ref, 'refs/tags/')
113125

114-
- name: Upload distribution 📦 to PyPI
126+
- name: Upload distribution to PyPI 🚀
115127
if: startsWith(github.ref, 'refs/tags/')
116128
uses: pypa/gh-action-pypi-publish@master
117129
with:
@@ -123,7 +135,8 @@ jobs:
123135

124136
Conda:
125137
needs: deploy
126-
runs-on: "ubuntu-18.04"
138+
runs-on: "ubuntu-20.04"
139+
if: startsWith(github.ref, 'refs/tags/') || (startsWith(github.event.head_commit.message, 'Bump version') != true)
127140
steps:
128141
- name: Checkout 🛎️
129142
uses: "actions/checkout@v2"
@@ -147,7 +160,6 @@ jobs:
147160
bash .github/actions_build_conda.sh
148161
149162
- name: Deploy Conda 🚀
150-
if: startsWith(github.ref, 'refs/tags/')
151163
run: |
152164
chmod +x .github/actions_deploy_conda.sh
153165
bash .github/actions_deploy_conda.sh

.github/workflows/python_ci_macos.yml

Lines changed: 16 additions & 9 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,30 +9,37 @@ 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:
15-
USING_COVERAGE: '3.6,3.7,3.8,3.9,pypy3'
16+
USING_COVERAGE: '3.6,3.7,3.8,3.9,pypy-3.6'
1617

1718
strategy:
1819
fail-fast: False
1920
matrix:
20-
python-version: ["3.6","3.7","3.8","3.9","pypy3"]
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}
26+
- {python-version: "pypy-3.6", testenvs: "pypy3,build", experimental: False}
2127

2228
steps:
2329
- name: Checkout 🛎️
2430
uses: "actions/checkout@v2"
31+
2532
- name: Setup Python 🐍
2633
uses: "actions/setup-python@v2"
2734
with:
28-
python-version: "${{ matrix.python-version }}"
35+
python-version: "${{ matrix.config.python-version }}"
36+
2937
- name: Install dependencies 🔧
3038
run: |
3139
python -VV
3240
python -m site
3341
python -m pip install --upgrade pip setuptools wheel
34-
python -m pip install --upgrade tox tox-gh-actions virtualenv
35-
42+
python -m pip install --upgrade tox virtualenv
3643
37-
- name: "Run Tests for Python ${{ matrix.python-version }}"
38-
run: "python -m tox"
44+
- name: "Run Tests for Python ${{ matrix.config.python-version }}"
45+
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

0 commit comments

Comments
 (0)