Skip to content

python versions

python versions #3

name: python versions
on:
schedule:
# Notifications will be sent to whoever touches this last
# You will be able to trigger this workflow manually if need be
# This runs at 4:00 every Saturday, where GHA should in theory be less busy.
- cron: '0 4 * * 6'
jobs:
# This workflow makes sure that Python dependencies install correctly for
# a) our current version b) the next version we're targetting and c) a futher along version
python-versions:
name: set up
runs-on: ${{ matrix.os }}
timeout-minutes: 10
strategy:
matrix:
# macosx-10.15 is Catalina
# macosx-11.0 is Big Sur, however, it takes long for jobs to get started
os: [ macos-10.15, macos-11.0, ubuntu-20.04 ]
python-version: [ 3.6, 3.8, 3.9 ]
fail-fast: false
env:
PIP_DISABLE_PIP_VERSION_CHECK: on
# There's a check that prevents make install-py-dev to work if the developer has not
# explicitely set the intention to use a non-default Python version
SENTRY_PYTHON_VERSION: ${{ matrix.python-version }}
steps:
- uses: actions/checkout@v2
- name: Install prerequisites
run: |
HOMEBREW_NO_AUTO_UPDATE=1 brew bundle --no-upgrade
# Until GH composite actions can use `uses`, we need to setup python here
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Setup pip
uses: ./.github/actions/setup-pip
id: pip
- name: Cache
uses: actions/cache@v2
with:
path: |
${{ steps.pip.outputs.pip-cache-dir }}
key: |
${{ matrix.os }}-py${{ matrix.python-version }}-pip${{ steps.pip.outputs.pip-version }}-${{ hashFiles('requirements-*.txt') }}
restore-keys: |
${{ matrix.os }}-py${{ matrix.python-version }}-pip${{ steps.pip.outputs.pip-version }}
- name: Install dependencies
run: |
python -m venv .venv
source .venv/bin/activate
pip install wheel
make install-py-dev