macos-11 runners are not available anymore #31
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions | |
name: Unit tests | |
on: | |
push: | |
branches: [ "master" ] | |
pull_request: | |
branches: [ "master" ] | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: ["ubuntu-latest", "macos-latest"] | |
python-version: ["3.10", "3.12", "pypy2.7", "pypy3.9"] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
python -m pip install coverage codecov | |
- name: Non-regression tests | |
run: | | |
export PYTHONPATH=$PYTHONPATH:$(pwd) | |
coverage run ./tests/test_all.py | |
- name: Update codecov | |
run: | | |
codecov | |
python23: | |
name: python2.3 | |
runs-on: "ubuntu-latest" | |
strategy: | |
fail-fast: false | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python 2.3 | |
run: | | |
cd .. | |
curl -O https://www.python.org/ftp/python/2.3.7/Python-2.3.7.tgz | |
tar xzf Python-2.3.7.tgz | |
cd Python-2.3.7 | |
# We need to disable FORTIFY_SOURCE to compile python 2.3 | |
# cf. https://bugs.launchpad.net/ubuntu/+source/gcc-defaults/+bug/286334 | |
./configure BASECFLAGS=-U_FORTIFY_SOURCE | |
make | |
sudo ln -fs $(pwd)/python /usr/local/bin/python | |
- name: Non-regression tests | |
run: | | |
python -c 'import sys;print(sys.version)' | |
export PYTHONPATH=$PYTHONPATH:$(pwd) | |
python ./tests/test_all.py | |
examples: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: ["macos-12", "macos-13"] | |
python-version: ["3.10"] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Non-regression tests | |
run: | | |
export PYTHONPATH=$PYTHONPATH:$(pwd) | |
zsh ./tests/examples_macos.sh |