Skip to content

Commit

Permalink
CI(GHActions): Install all Python and PyPy versions from conda-forge
Browse files Browse the repository at this point in the history
  • Loading branch information
phdru committed Jul 17, 2023
1 parent 4948522 commit 6a511e7
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 12 deletions.
25 changes: 14 additions & 11 deletions .github/workflows/test-publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,25 +8,25 @@ on: [push, pull_request]
jobs:
run-tests:
env:
not_in_conda: "['3.7', '3.11', 'pypy-3.7']"
not_in_conda: "[]"

strategy:
matrix:
os: [ubuntu-latest, macos-11, windows-latest]
python-version: ["2.7", "3.5", "3.6", "3.7", "3.8", "3.9", "3.10", "3.11", "pypy-3.7"]
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["2.7", "3.5", "3.6", "3.7", "3.8", "3.9", "3.10", "3.11", "pypy3.7"]
include:
- os: ubuntu-latest
os-name: Linux
pip-cache-path: ~/.cache/pip
- os: macos-11
- os: macos-latest
os-name: MacOS
pip-cache-path: ~/Library/Caches/pip
- os: windows-latest
os-name: w32
pip-cache-path: ~\AppData\Local\pip\Cache
exclude:
- os: macos-11
python-version: "pypy-3.7"
- os: windows-latest
python-version: "pypy3.7"

name: Python ${{ matrix.python-version }} @ ${{ matrix.os-name }}
runs-on: ${{ matrix.os }}
Expand All @@ -35,19 +35,21 @@ jobs:

# Setup Python/pip
- uses: actions/checkout@v2
# Python 3.7 is needed for ghactions-release script
- uses: actions/setup-python@v4
# Python 3.7 is needed for ghactions-release script
- uses: s-weigand/setup-conda@v1
with:
conda-channels: conda-forge
python-version: "3.7"
if: ${{ matrix.python-version == '2.7' && runner.os != 'Windows' && startsWith(github.ref, 'refs/tags/') }}
- uses: s-weigand/setup-conda@v1
with:
conda-channels: conda-forge
python-version: ${{ matrix.python-version }}
if: ${{ runner.os == 'Linux' && !contains(fromJSON(env.not_in_conda), matrix.python-version) }}
if: ${{ !contains(fromJSON(env.not_in_conda), matrix.python-version) }}
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
if: ${{ runner.os != 'Linux' || contains(fromJSON(env.not_in_conda), matrix.python-version) }}
if: ${{ contains(fromJSON(env.not_in_conda), matrix.python-version) }}
- name: Cache pip
uses: actions/cache@v3
with:
Expand All @@ -58,9 +60,10 @@ jobs:
- name: Install dependencies
run: |
python --version
python -m ensurepip
python -m pip install --upgrade pip setuptools wheel
pip --version
pip install --upgrade virtualenv "tox < 4"
pip install --upgrade virtualenv "tox >= 3.15, < 4"
- name: Set TOXENV
run: |
import os, sys
Expand Down
1 change: 0 additions & 1 deletion devscripts/requirements/requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +0,0 @@
--install-option=-O2
2 changes: 2 additions & 0 deletions docs/news.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ News
Development (master)
--------------------

* CI(GHActions): Install all Python and PyPy versions from ``conda-forge``.

3.3.1 (2022-12-25)
------------------

Expand Down

0 comments on commit 6a511e7

Please sign in to comment.