-
Notifications
You must be signed in to change notification settings - Fork 11
83 lines (79 loc) · 2.4 KB
/
linux.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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
name: Linux tests
on:
push: {branches: [master]}
pull_request: {branches: [master]}
jobs:
test:
runs-on: ubuntu-20.04
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
imgtag:
- 2.7-buster
- 3.4-stretch
- 3.5-buster
- 3.6-buster
- 3.7-buster
- 3.8-bullseye
- 3.9-bullseye
- 3.10-bullseye
paramiko_ver:
- 2.6.4
- 2.7.10
- 2.8.8
container: "python:${{matrix.imgtag}}"
steps:
- uses: actions/checkout@v2
- name: System dependencies
run: |
apt-get -q -y update
apt-get -q -y install openssh-client openssh-server rsync sudo
if [ 3.4-stretch = "${{matrix.imgtag}}" ]; then
sed -i -e '/^mesg n/d' /root/.profile
fi
- name: Python dependencies
run: |
# nose and Fudge need use_2to3 which setuptools-58 removed
pip install 'setuptools<58'
# nose binary wheel is not compatible with python-3.10
# see https://github.com/nose-devs/nose/issues/1099#issuecomment-577412313
pip install --no-binary nose -r dev-requirements.txt
pip install paramiko-ng==${{matrix.paramiko_ver}}
pip install -e .
- name: Lint
run: |
flake8 --version
flake8 --show-source
- name: Setup SSH
run: |
export USER=root HOME=/root
mkdir -v /run/sshd
/usr/sbin/sshd -D & sleep 1
mkdir -v ~/.ssh
ssh-keygen -N "" -f ~/.ssh/testkey
cp -v ~/.ssh/testkey.pub ~/.ssh/authorized_keys
ssh-keyscan -t ecdsa localhost > ~/.ssh/known_hosts
- name: Test
run: |
export USER=root HOME=/root
eval $(ssh-agent)
ssh-add ~/.ssh/testkey
script -e -q -c "fab test" /dev/null
script -e -q -c "fab -H localhost test:integration" /dev/null
docs:
runs-on: ubuntu-20.04
timeout-minutes: 30
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v1
with:
python-version: 3.8
- name: Install dependencies
run: |
pip install -r doc-requirements.txt
pip install paramiko-ng==2.8.4
pip install -e .
- name: Build docs
run: |
sphinx-build -W sites/docs tmpbuild