-
Notifications
You must be signed in to change notification settings - Fork 572
76 lines (60 loc) · 2.19 KB
/
staging-tests.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
name: Staging Tests
on: [workflow_dispatch]
jobs:
test:
name: Run tests
strategy:
matrix:
include:
- test-name: ubuntu-20.04-python-2.7
os: ubuntu-20.04
python-version: 2.7
- test-name: ubuntu-18.04-python-3.4
os: ubuntu-18.04
python-version: 3.4
- test-name: ubuntu-20.04-python-3.5
os: ubuntu-20.04
python-version: 3.5
- test-name: ubuntu-20.04-python-3.6
os: ubuntu-20.04
python-version: 3.6
- test-name: ubuntu-20.04-python-3.7
os: ubuntu-20.04
python-version: 3.7
- test-name: ubuntu-20.04-python-3.8
os: ubuntu-20.04
python-version: 3.8
runs-on: ${{ matrix.os }}
steps:
- name: Checkout repo
uses: actions/checkout@v2
- name: Setup python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install virtualenv
pip install -U -r tests/requirements.txt
- name: Mount staging.gethttpsforfree.com on local for serving challenge files
env:
STAGING_SSH_KEY: ${{ secrets.STAGING_SSH_KEY }}
run: |
sudo apt install sshfs
export SSHFS_KEYFILE=$(pwd)/sshfs_key.pem
touch $SSHFS_KEYFILE
chmod 600 $SSHFS_KEYFILE
echo "$STAGING_SSH_KEY" > $SSHFS_KEYFILE
mkdir -p /tmp/challenge-files
nohup sshfs -o StrictHostKeyChecking=no,debug,IdentityFile=$SSHFS_KEYFILE -p 2299 [email protected]:/acme-challenge /tmp/challenge-files &
sleep 10
ls -lah /tmp/challenge-files
- name: Run tests using the Let's Encrypt staging server
run: |
export ACME_TINY_USE_STAGING="1"
export ACME_TINY_DOMAIN="staging.gethttpsforfree.com"
export ACME_TINY_SSHFS_CHALLENGE_DIR="/tmp/challenge-files"
coverage run --source . --omit ./setup.py -m unittest tests
- name: Print coverage report
run: coverage report -m