forked from getsentry/sentry
50 lines (45 loc) · 1.63 KB
/
python-deps.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
name: python deps
on:
pull_request:
paths:
- '.github/actions/setup-python/action.yml'
- '.github/workflows/python-deps.yml'
- 'requirements-*.txt'
jobs:
# This workflow makes sure that Python dependencies install correctly for
# a) our current version b) the next version we're targetting
python-deps:
name: install
runs-on: ${{ matrix.os }}
timeout-minutes: 20
strategy:
matrix:
os: [macos-11.0, ubuntu-20.04]
python-version: [3.6.13, 3.8.11]
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
env:
HOMEBREW_NO_AUTO_UPDATE: on
# Necessary packages for some Python deps
run: |
brew install libxmlsec1
- name: Setup Python
uses: ./.github/actions/setup-python
with:
# Non-default value since install-py-dev installs all requirements files
# We also want to bust the cache if the action and workflow change
cache-files-hash: ${{ hashFiles('requirements-*.txt', '.github/actions/setup-python/action.yml', '.github/workflows/python-deps.yml') }}
- name: Install dependencies
run: |
python -m venv .venv
source .venv/bin/activate
make install-py-dev
# This exercises the requirements-pre-commit.txt file
make setup-git