-
-
Notifications
You must be signed in to change notification settings - Fork 44
68 lines (58 loc) · 2.12 KB
/
mamba.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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
name: Mamba tests
on:
push:
branches: [master]
pull_request:
jobs:
mamba_test:
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.7
uses: actions/setup-python@v2
with:
python-version: 3.7
- name: Upgrade pip
run: |
python3 -m pip install --upgrade pipenv
# Pipenv doesn't support specifying global options. See:
#
# https://github.com/pypa/pipenv/issues/2208
#
# We want to make sure that we're testing pure python dulwich,
# since that's what the users will be using.
#
# We only want to install dulwich via the `-r requirements.txt`
# method, since the presence of any non-default option causes pip
# to avoid using wheels for all the other dependencies, which
# slows down the build considerably (and breaks it on Windows). I
# don't think that any of our other current dependencies might
# potentially use binary wheels, so in this case using wheels is
# probably safe. (Besides, AFAIK we didn't have any issues
# specifically caused by a dependency other than dulwich (see
# #138, so testing the other dependencies isn't a focus.)
#
# Unfortunately, I didn't manage to get process substitution
# (`<()`) to work, within GitHub actions, so I'm writing
# requirements.txt to a file.
- name: Write dulwich version to requirements.txt
shell: bash
run: |
pipenv requirements | sed -nE 's/(^dulwich==.+$)/\1 --config-settings "--global-option=--pure"/p' > requirements.txt
- name: Install pure dulwich from requirements.txt
run: |
pipenv run pip install --no-binary dulwich -r requirements.txt
- name: Install all other dependencies
shell: bash
run: |
pipenv install --dev
# TODO Run each test separately? (See: #145.)
# TODO Remove PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python hack on upgrading python.
- name: Run tests
run: |
pipenv run mamba ./
env:
PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION: python