| 1 |
name: Staging Tests |
| 2 |
on: [workflow_dispatch] |
| 3 |
jobs: |
| 4 |
test: |
| 5 |
name: Run tests |
| 6 |
|
| 7 |
strategy: |
| 8 |
matrix: |
| 9 |
include: |
| 10 |
|
| 11 |
- test-name: ubuntu-22.04-python-3.9 |
| 12 |
os: ubuntu-22.04 |
| 13 |
python-version: "3.9" |
| 14 |
|
| 15 |
- test-name: ubuntu-22.04-python-3.10 |
| 16 |
os: ubuntu-22.04 |
| 17 |
python-version: "3.10" |
| 18 |
|
| 19 |
- test-name: ubuntu-22.04-python-3.11 |
| 20 |
os: ubuntu-22.04 |
| 21 |
python-version: "3.11" |
| 22 |
|
| 23 |
- test-name: ubuntu-24.04-python-3.12 |
| 24 |
os: ubuntu-24.04 |
| 25 |
python-version: "3.12" |
| 26 |
|
| 27 |
- test-name: ubuntu-24.04-python-3.13 |
| 28 |
os: ubuntu-24.04 |
| 29 |
python-version: "3.13" |
| 30 |
|
| 31 |
runs-on: ${{ matrix.os }} |
| 32 |
|
| 33 |
steps: |
| 34 |
|
| 35 |
- name: Checkout repo |
| 36 |
uses: actions/checkout@v4 |
| 37 |
|
| 38 |
- name: Setup python |
| 39 |
uses: actions/setup-python@v5 |
| 40 |
with: |
| 41 |
python-version: ${{ matrix.python-version }} |
| 42 |
|
| 43 |
- name: Install dependencies |
| 44 |
run: | |
| 45 |
python -m pip install --upgrade pip |
| 46 |
pip install -U -r tests/requirements.txt |
| 47 |
|
| 48 |
- name: Mount staging.gethttpsforfree.com on local for serving challenge files |
| 49 |
env: |
| 50 |
STAGING_SSH_KEY: ${{ secrets.STAGING_SSH_KEY }} |
| 51 |
run: | |
| 52 |
sudo apt install sshfs |
| 53 |
export SSHFS_KEYFILE=$(pwd)/sshfs_key.pem |
| 54 |
touch $SSHFS_KEYFILE |
| 55 |
chmod 600 $SSHFS_KEYFILE |
| 56 |
echo "$STAGING_SSH_KEY" > $SSHFS_KEYFILE |
| 57 |
mkdir -p /tmp/challenge-files |
| 58 |
nohup sshfs -o StrictHostKeyChecking=no,debug,IdentityFile=$SSHFS_KEYFILE -p 2299 [email protected]:/acme-challenge /tmp/challenge-files & |
| 59 |
sleep 10 |
| 60 |
ls -lah /tmp/challenge-files |
| 61 |
|
| 62 |
- name: Run tests using the Let's Encrypt staging server |
| 63 |
run: | |
| 64 |
export ACME_TINY_USE_STAGING="1" |
| 65 |
export ACME_TINY_DOMAIN="staging.gethttpsforfree.com" |
| 66 |
export ACME_TINY_SSHFS_CHALLENGE_DIR="/tmp/challenge-files" |
| 67 |
coverage run --source . --omit ./setup.py -m unittest tests |
| 68 |
|
| 69 |
- name: Print coverage report |
| 70 |
run: coverage report -m |
| 71 |
|