Debian Codegraph @

.github/workflows/full-tests-with-coverage.yml

raw
1 name: Tests
2 on: [push]
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 pebble
39 run: |
40 wget https://github.com/letsencrypt/pebble/releases/latest/download/pebble-linux-amd64.tar.gz
41 tar -xvzf pebble-linux-amd64.tar.gz -C /tmp
42 chmod 744 /tmp/pebble-linux-amd64/linux/amd64/pebble
43 /tmp/pebble-linux-amd64/linux/amd64/pebble -h || true
44
45 - name: Setup python
46 uses: actions/setup-python@v5
47 with:
48 python-version: ${{ matrix.python-version }}
49
50 - name: Install dependencies
51 run: |
52 python -m pip install --upgrade pip
53 pip install -U -r tests/requirements.txt
54
55 - name: Run tests with coverage
56 run: |
57 export ACME_TINY_PEBBLE_BIN="/tmp/pebble-linux-amd64/linux/amd64/pebble"
58 coverage run --source . --omit ./setup.py -m unittest tests
59
60 - name: Print coverage report
61 run: coverage report -m
62
63 - name: Upload coverage to coveralls.io
64 env:
65 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
66 COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_TOKEN }}
67 COVERALLS_SERVICE_NAME: github-actions
68 COVERALLS_FLAG_NAME: ${{ matrix.test-name }}
69 COVERALLS_PARALLEL: true
70 run: |
71 python -m pip install --upgrade coveralls
72 coveralls
73
74 coveralls:
75 name: Indicate completion to coveralls.io
76 needs: test
77 runs-on: ubuntu-latest
78 container: python:3-slim
79 steps:
80 - name: Finished
81 env:
82 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
83 run: |
84 python -m pip install --upgrade coveralls
85 coveralls --service=github --finish
86