Skip to content

Commit

Permalink
Updated files with 'repo_helper'. (#5)
Browse files Browse the repository at this point in the history
Co-authored-by: repo-helper[bot] <74742576+repo-helper[bot]@users.noreply.github.com>
  • Loading branch information
repo-helper[bot] committed Dec 23, 2020
1 parent 81ff74d commit ed2cef6
Show file tree
Hide file tree
Showing 20 changed files with 245 additions and 114 deletions.
5 changes: 2 additions & 3 deletions .github/actions_build_conda.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,9 @@ conda install conda-build
conda install anaconda-client
conda info -a

conda config --add channels domdfcoding || exit 1

conda config --add channels conda-forge || exit 1
conda config --add channels domdfcoding || exit 1

conda build conda -c domdfcoding -c conda-forge --output-folder conda/dist --skip-existing
conda build conda -c conda-forge -c domdfcoding --output-folder conda/dist --skip-existing

exit 0
10 changes: 10 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# This file is managed by 'repo_helper'. Don't edit it directly.
---
version: 2
updates:
- package-ecosystem: pip
directory: /
schedule:
interval: weekly
reviewers:
- domdfcoding
11 changes: 5 additions & 6 deletions .github/workflows/conda_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ jobs:
name: "Conda"
runs-on: ubuntu-latest

strategy:

steps:
- name: Checkout 🛎️
uses: "actions/checkout@v2"
Expand All @@ -31,15 +29,16 @@ jobs:
python -m pip install --upgrade repo_helper
# $CONDA is an environment variable pointing to the root of the miniconda directory
$CONDA/bin/conda update -q conda
$CONDA/bin/conda config --add channels domdfcoding
$CONDA/bin/conda install conda-build
$CONDA/bin/conda config --add channels conda-forge
$CONDA/bin/conda config --add channels domdfcoding
- name: "Build and install package"
run: |
# This mess is only necessary because conda won't fix it themselves
# https://github.com/conda/conda/issues/1884
python -m repo_helper build --conda --out-dir conda-bld/noarch
$CONDA/bin/conda install flake8_sphinx_links -c local -y || exit 1
$CONDA/bin/conda index ./conda-bld || exit 1
$CONDA/bin/conda install -c file://$(pwd)/conda-bld flake8_sphinx_links -y || exit 1
32 changes: 32 additions & 0 deletions .github/workflows/flake8.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# This file is managed by 'repo_helper'. Don't edit it directly.
---
name: Flake8

on:
push:
pull_request:
branches: ["master"]

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

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

- name: Setup Python 🐍
uses: "actions/setup-python@v2"
with:
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 tox
- name: "Run Flake8"
run: "python -m tox -e lint -- --format github"
37 changes: 37 additions & 0 deletions .github/workflows/mypy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# This file is managed by 'repo_helper'. Don't edit it directly.
---
name: mypy

on:
push:
pull_request:
branches: ["master"]

jobs:
Run:
name: "mypy / ${{ matrix.os }}"
runs-on: ${{ matrix.os }}

strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
fail-fast: false

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

- name: Setup Python 🐍
uses: "actions/setup-python@v2"
with:
python-version: "3.6"

- name: Install dependencies 🔧
run: |
python -VV
python -m site
python -m pip install --upgrade pip setuptools wheel
python -m pip install tox
- name: "Run mypy"
run: "python -m tox -e mypy"
2 changes: 2 additions & 0 deletions .github/workflows/octocheese.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
name: "GitHub Releases"
on:
push:
branches: ["master"]
schedule:
- cron: 0 12 * * 2,4,6

Expand All @@ -16,3 +17,4 @@ jobs:
pypi_name: "flake8_sphinx_links"
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
if: startsWith(github.ref, 'refs/tags/') != true
25 changes: 16 additions & 9 deletions .github/workflows/python_ci.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This file is managed by 'repo_helper'. Don't edit it directly.
---
name: Windows Tests
name: Windows

on:
push:
Expand All @@ -9,30 +9,37 @@ on:

jobs:
tests:
name: "Python ${{ matrix.python-version }}"
name: "windows-2019 / Python ${{ matrix.config.python-version }}"
runs-on: "windows-2019"
continue-on-error: ${{ matrix.config.experimental }}
env:
USING_COVERAGE: '3.6,3.7,3.8,3.9'
USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10.0-alpha.3'

strategy:
fail-fast: False
matrix:
python-version: ["3.6","3.7","3.8","3.9"]
config:
- {python-version: "3.6", testenvs: "py36,build", experimental: False}
- {python-version: "3.7", testenvs: "py37,build", experimental: False}
- {python-version: "3.8", testenvs: "py38,build", experimental: False}
- {python-version: "3.9", testenvs: "py39,build", experimental: False}
- {python-version: "3.10.0-alpha.3", testenvs: "py310-dev,build", experimental: True}

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

- name: Setup Python 🐍
uses: "actions/setup-python@v2"
with:
python-version: "${{ matrix.python-version }}"
python-version: "${{ matrix.config.python-version }}"

- name: Install dependencies 🔧
run: |
python -VV
python -m site
python -m pip install --upgrade pip setuptools wheel
python -m pip install --upgrade tox tox-gh-actions virtualenv
python -m pip install --upgrade tox virtualenv
- name: "Run Tests for Python ${{ matrix.python-version }}"
run: "python -m tox"
- name: "Run Tests for Python ${{ matrix.config.python-version }}"
run: python -m tox -e "${{ matrix.config.testenvs }}"
51 changes: 32 additions & 19 deletions .github/workflows/python_ci_linux.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This file is managed by 'repo_helper'. Don't edit it directly.
---
name: Linux Tests
name: Linux

on:
push:
Expand All @@ -9,45 +9,54 @@ on:

jobs:
tests:
name: "Python ${{ matrix.python-version }}"
runs-on: "ubuntu-18.04"
name: "ubuntu-20.04 / Python ${{ matrix.config.python-version }}"
runs-on: "ubuntu-20.04"
continue-on-error: ${{ matrix.config.experimental }}
env:
USING_COVERAGE: '3.6,3.7,3.8,3.9,pypy3'
USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10.0-alpha.3,pypy-3.6'

strategy:
fail-fast: False
matrix:
python-version: ["3.6","3.7","3.8","3.9","pypy3"]
config:
- {python-version: "3.6", testenvs: "py36,build", experimental: False}
- {python-version: "3.7", testenvs: "py37,build", experimental: False}
- {python-version: "3.8", testenvs: "py38,build", experimental: False}
- {python-version: "3.9", testenvs: "py39,build", experimental: False}
- {python-version: "3.10.0-alpha.3", testenvs: "py310-dev,build", experimental: True}
- {python-version: "pypy-3.6", testenvs: "pypy3,build", experimental: False}

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

- name: Setup Python 🐍
uses: "actions/setup-python@v2"
with:
python-version: "${{ matrix.python-version }}"
python-version: "${{ matrix.config.python-version }}"

- name: Install dependencies 🔧
run: |
python -VV
python -m site
python -m pip install --upgrade pip setuptools wheel
python -m pip install --upgrade tox tox-gh-actions virtualenv
python -m pip install --upgrade tox virtualenv
python -m pip install --upgrade coverage_pyver_pragma
- name: "Run Tests for Python ${{ matrix.python-version }}"
run: "python -m tox"
- name: "Run Tests for Python ${{ matrix.config.python-version }}"
run: python -m tox -e "${{ matrix.config.testenvs }}"


- name: "Upload Coverage"
- name: "Upload Coverage 🚀"
uses: actions/upload-artifact@v2
with:
name: "coverage-${{ matrix.python-version }}"
name: "coverage-${{ matrix.config.python-version }}"
path: .coverage


Coverage:
needs: tests
runs-on: "ubuntu-18.04"
runs-on: "ubuntu-20.04"
steps:
- name: Checkout 🛎️
uses: "actions/checkout@v2"
Expand All @@ -62,7 +71,7 @@ jobs:
python -m pip install --upgrade pip setuptools wheel
python -m pip install --upgrade coveralls coverage_pyver_pragma
- name: "Download Coverage"
- name: "Download Coverage 🪂"
uses: actions/download-artifact@v2
with:
path: coverage
Expand All @@ -71,12 +80,12 @@ jobs:
run: ls -R
working-directory: coverage

- name: Combine Coverage
- name: Combine Coverage 👷
run: |
shopt -s globstar
python -m coverage combine coverage/**/.coverage
- name: "Upload Combined Coverage Artefact"
- name: "Upload Combined Coverage Artefact 🚀"
uses: actions/upload-artifact@v2
with:
name: "combined-coverage"
Expand All @@ -91,27 +100,31 @@ jobs:
Deploy:
needs: tests

runs-on: "ubuntu-18.04"
runs-on: "ubuntu-20.04"
steps:
- name: Checkout 🛎️
uses: "actions/checkout@v2"
if: startsWith(github.ref, 'refs/tags/')

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

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

- name: Build distributions 📦
run: |
tox -e build
if: startsWith(github.ref, 'refs/tags/')

- name: Upload distribution 📦 to PyPI
- name: Upload distribution to PyPI 🚀
if: startsWith(github.ref, 'refs/tags/')
uses: pypa/gh-action-pypi-publish@master
with:
Expand All @@ -123,7 +136,8 @@ jobs:

Conda:
needs: deploy
runs-on: "ubuntu-18.04"
runs-on: "ubuntu-20.04"
if: startsWith(github.ref, 'refs/tags/') || (startsWith(github.event.head_commit.message, 'Bump version') != true)
steps:
- name: Checkout 🛎️
uses: "actions/checkout@v2"
Expand All @@ -147,7 +161,6 @@ jobs:
bash .github/actions_build_conda.sh
- name: Deploy Conda 🚀
if: startsWith(github.ref, 'refs/tags/')
run: |
chmod +x .github/actions_deploy_conda.sh
bash .github/actions_deploy_conda.sh
Expand Down
26 changes: 17 additions & 9 deletions .github/workflows/python_ci_macos.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This file is managed by 'repo_helper'. Don't edit it directly.
---
name: macOS Tests
name: macOS

on:
push:
Expand All @@ -9,30 +9,38 @@ on:

jobs:
tests:
name: "Python ${{ matrix.python-version }}"
name: "macos-latest / Python ${{ matrix.config.python-version }}"
runs-on: "macos-latest"
continue-on-error: ${{ matrix.config.experimental }}
env:
USING_COVERAGE: '3.6,3.7,3.8,3.9,pypy3'
USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10.0-alpha.3,pypy-3.6'

strategy:
fail-fast: False
matrix:
python-version: ["3.6","3.7","3.8","3.9","pypy3"]
config:
- {python-version: "3.6", testenvs: "py36,build", experimental: False}
- {python-version: "3.7", testenvs: "py37,build", experimental: False}
- {python-version: "3.8", testenvs: "py38,build", experimental: False}
- {python-version: "3.9", testenvs: "py39,build", experimental: False}
- {python-version: "3.10.0-alpha.3", testenvs: "py310-dev,build", experimental: True}
- {python-version: "pypy-3.6", testenvs: "pypy3,build", experimental: False}

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

- name: Setup Python 🐍
uses: "actions/setup-python@v2"
with:
python-version: "${{ matrix.python-version }}"
python-version: "${{ matrix.config.python-version }}"

- name: Install dependencies 🔧
run: |
python -VV
python -m site
python -m pip install --upgrade pip setuptools wheel
python -m pip install --upgrade tox tox-gh-actions virtualenv
python -m pip install --upgrade tox virtualenv
- name: "Run Tests for Python ${{ matrix.python-version }}"
run: "python -m tox"
- name: "Run Tests for Python ${{ matrix.config.python-version }}"
run: python -m tox -e "${{ matrix.config.testenvs }}"
Loading

0 comments on commit ed2cef6

Please sign in to comment.