-
-
Notifications
You must be signed in to change notification settings - Fork 23
96 lines (91 loc) · 3.35 KB
/
main.yaml
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
on:
- push
- pull_request
name: Main
jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.7'
- run: |
pip install poetry
poetry install
poetry run pre-commit run --all-files --show-diff-on-failure
test:
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
python-version:
- '3.5'
- '3.6'
- '3.7'
- '3.8'
- '3.9'
- '3.10'
- '3.11'
git-version:
- default # 2.28.0 or newer
include:
- python-version: '3.7'
git-version: '2.21.0' # https://lore.kernel.org/git/CAKqNo6RJqp94uLMf8Biuo=ZvMZB9Mq6RRMrUgsLW4u1ks+mnOA@mail.gmail.com/T/#u
- python-version: '3.7'
git-version: '2.7.0'
- python-version: '3.7'
git-version: '2.2.0'
- python-version: '3.7'
git-version: '1.8.2.3'
name: test (python = ${{ matrix.python-version }}, git = ${{ matrix.git-version }})
env:
DARCS_EMAIL: foo <[email protected]>
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
# - uses: dtolnay/[email protected]
# - uses: Swatinem/rust-cache@v2
- if: ${{ matrix.git-version != 'default' }}
env:
NO_OPENSSL: 'yes'
run: |
sudo apt-get update
sudo apt-get install dh-autoreconf libcurl4-gnutls-dev libexpat1-dev gettext libz-dev libssl-dev
curl -o git.tar.gz https://mirrors.edge.kernel.org/pub/software/scm/git/git-${{ matrix.git-version }}.tar.gz
tar -zxf git.tar.gz
cd git-${{ matrix.git-version }}
make configure
./configure --prefix=/usr
sudo make install
which git
git --version
- run: |
export PATH="$PATH:/opt"
sudo apt-get update
sudo apt-get install -y darcs bzr
# For Pijul:
# sudo apt-get install -y libxxhash-dev libzstd-dev expect
# rehosted because the official site deletes older artifacts:
curl -L -o ~/fossil.tgz https://github.com/mtkennerly/storage/raw/06e29a4005b24a65bc7d639c0aa1fc152a85d0b7/software/fossil-linux-x64-2.13.tar.gz
tar -xvf ~/fossil.tgz -C /opt
# TODO: Re-enable Pijul tests once this is fixed: https://nest.pijul.com/pijul/pijul/discussions/777
# - name: Prepare Pijul
# run: |
# # Same as default features, but without openssl:
# cargo install pijul --version 1.0.0-beta.2 --no-default-features --features keep-changes
# expect -c 'spawn pijul key generate test ; expect "Password for the new key (press enter to leave it unencrypted):" ; send -- "\r" ; expect eof'
- run: |
export PATH="$PATH:/opt"
git config --global user.name "foo"
git config --global user.email "[email protected]"
bzr whoami 'foo <[email protected]>'
- if: ${{ matrix.python-version == '3.5' || matrix.python-version == '3.6' }}
run: |
cp poetry.legacy.lock poetry.lock
- run: |
pip install poetry
poetry install
poetry run pytest --verbose --cov --cov-report term-missing