Skip to content

Commit

Permalink
Merge fb0ce2d into 0dc279e
Browse files Browse the repository at this point in the history
  • Loading branch information
repo-helper[bot] committed May 10, 2022
2 parents 0dc279e + fb0ce2d commit 2740272
Show file tree
Hide file tree
Showing 21 changed files with 152 additions and 115 deletions.
22 changes: 0 additions & 22 deletions .github/actions_build_conda.sh

This file was deleted.

23 changes: 0 additions & 23 deletions .github/actions_deploy_conda.sh

This file was deleted.

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"))
10 changes: 5 additions & 5 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 @@ -31,10 +31,10 @@ exemptAssignees: false
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.

20 changes: 14 additions & 6 deletions .github/workflows/conda_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ jobs:
tests:
name: "Conda"
runs-on: ubuntu-18.04
defaults:
run:
shell: bash -l {0}

steps:
- name: Checkout 🛎️
Expand All @@ -23,16 +26,20 @@ jobs:
with:
python-version: "3.8"

- name: Setup Conda
uses: conda-incubator/setup-miniconda@v2
with:
activate-environment: env
conda-build-version: 3.21.0

- name: Install dependencies 🔧
run: |
python -VV
python -m site
python -m pip install --upgrade pip setuptools wheel
python -m pip install --upgrade whey-conda
python -m pip install --upgrade "whey-conda" "whey"
# $CONDA is an environment variable pointing to the root of the miniconda directory
$CONDA/bin/conda update -q conda
$CONDA/bin/conda install conda-build=3.21.0
$CONDA/bin/conda update -n base conda
$CONDA/bin/conda config --add channels conda-forge
$CONDA/bin/conda config --add channels domdfcoding
Expand All @@ -53,5 +60,6 @@ jobs:
- name: "Run Tests"
run: |
rm -rf configconfig
$CONDA/bin/pip install -r tests/requirements.txt
$CONDA/bin/pytest tests/
$CONDA/bin/conda install pytest coincidence || exit 1
pip install -r tests/requirements.txt
pytest tests/
2 changes: 1 addition & 1 deletion .github/workflows/docs_test_action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: "actions/checkout@v1"
uses: "actions/checkout@v2"

- name: Check for changed files
uses: dorny/paths-filter@v2
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/python_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ on:

permissions:
actions: write
issues: write
contents: read

jobs:
Expand All @@ -21,7 +22,7 @@ jobs:
runs-on: "windows-2019"
continue-on-error: ${{ matrix.config.experimental }}
env:
USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10.0-rc.2'
USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10'

strategy:
fail-fast: False
Expand All @@ -31,7 +32,7 @@ jobs:
- {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-rc.2", testenvs: "py310-dev,build", experimental: True}
- {python-version: "3.10", testenvs: "py310-dev,build", experimental: True}

steps:
- name: Checkout 🛎️
Expand Down
67 changes: 53 additions & 14 deletions .github/workflows/python_ci_linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ on:

permissions:
actions: write
issues: write
contents: read

jobs:
Expand All @@ -22,7 +23,7 @@ jobs:
runs-on: "ubuntu-20.04"
continue-on-error: ${{ matrix.config.experimental }}
env:
USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10.0-rc.2'
USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10'

strategy:
fail-fast: False
Expand All @@ -32,7 +33,7 @@ jobs:
- {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-rc.2", testenvs: "py310-dev,build", experimental: True}
- {python-version: "3.10", testenvs: "py310-dev,build", experimental: True}

steps:
- name: Checkout 🛎️
Expand Down Expand Up @@ -99,21 +100,26 @@ jobs:
path: coverage

- name: Display structure of downloaded files
id: show
run: ls -R
working-directory: coverage
continue-on-error: true

- name: Combine Coverage 👷
if: ${{ steps.show.outcome != 'failure' }}
run: |
shopt -s globstar
python -m coverage combine coverage/**/.coverage
- name: "Upload Combined Coverage Artefact 🚀"
if: ${{ steps.show.outcome != 'failure' }}
uses: actions/upload-artifact@v2
with:
name: "combined-coverage"
path: .coverage

- name: "Upload Combined Coverage to Coveralls"
if: ${{ steps.show.outcome != 'failure' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
Expand All @@ -130,21 +136,21 @@ jobs:

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

- name: Install dependencies 🔧
if: startsWith(github.ref, 'refs/tags/')
run: |
python -m pip install --upgrade pip setuptools wheel
python -m pip install --upgrade tox
if: startsWith(github.ref, 'refs/tags/')
- name: Build distributions 📦
if: startsWith(github.ref, 'refs/tags/')
run: |
tox -e build
if: startsWith(github.ref, 'refs/tags/')
- name: Upload distribution to PyPI 🚀
if: startsWith(github.ref, 'refs/tags/')
Expand All @@ -154,6 +160,15 @@ jobs:
password: ${{ secrets.PYPI_TOKEN }}
skip_existing: true

- name: Close milestone 🚪
if: startsWith(github.ref, 'refs/tags/')
run: |
python -m pip install --upgrade github3.py packaging
python .github/milestones.py
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}



Conda:
needs: deploy
Expand All @@ -168,22 +183,46 @@ jobs:
with:
python-version: 3.8

- name: Setup Conda
uses: conda-incubator/setup-miniconda@v2
with:
activate-environment: env
conda-build-version: 3.21.0

- name: Install dependencies 🔧
run: |
python -VV
python -m site
python -m pip install --upgrade pip setuptools wheel
python -m pip install --upgrade mkrecipe
python -m pip install --upgrade "mkrecipe" "whey"
# $CONDA is an environment variable pointing to the root of the miniconda directory
$CONDA/bin/conda config --set always_yes yes --set changeps1 no
$CONDA/bin/conda update -n base conda
$CONDA/bin/conda info -a
$CONDA/bin/conda config --add channels conda-forge
$CONDA/bin/conda config --add channels domdfcoding
wget https://repo.anaconda.com/miniconda/Miniconda3-py38_4.10.3-Linux-x86_64.sh -O miniconda.sh
bash miniconda.sh -b -p $HOME/miniconda
$CONDA/bin/conda config --remove channels defaults
- name: Build Conda 📦
- name: Build Conda Package 📦
run: |
chmod +x .github/actions_build_conda.sh
bash .github/actions_build_conda.sh
python -m mkrecipe --type wheel || exit 1
$CONDA/bin/conda build conda -c conda-forge -c domdfcoding --output-folder conda/dist
- name: Deploy Conda 🚀
- name: Deploy Conda Package 🚀
if: startsWith(github.ref, 'refs/tags/')
run: |
chmod +x .github/actions_deploy_conda.sh
bash .github/actions_deploy_conda.sh
$CONDA/bin/conda config --set always_yes yes --set changeps1 no
$CONDA/bin/conda install anaconda-client
$CONDA/bin/conda info -a
for f in conda/dist/noarch/configconfig-*.tar.bz2; do
[ -e "$f" ] || continue
echo "$f"
conda install "$f" || exit 1
echo "Deploying to Anaconda.org..."
$CONDA/bin/anaconda -t "$ANACONDA_TOKEN" upload "$f" || exit 1
echo "Successfully deployed to Anaconda.org."
done
env:
ANACONDA_TOKEN: ${{ secrets.ANACONDA_TOKEN }}
5 changes: 3 additions & 2 deletions .github/workflows/python_ci_macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ on:

permissions:
actions: write
issues: write
contents: read

jobs:
Expand All @@ -21,7 +22,7 @@ jobs:
runs-on: "macos-latest"
continue-on-error: ${{ matrix.config.experimental }}
env:
USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10.0-rc.2'
USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10'

strategy:
fail-fast: False
Expand All @@ -31,7 +32,7 @@ jobs:
- {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-rc.2", testenvs: "py310-dev,build", experimental: True}
- {python-version: "3.10", testenvs: "py310-dev,build", experimental: True}

steps:
- name: Checkout 🛎️
Expand Down
Loading

0 comments on commit 2740272

Please sign in to comment.