Files
acme-tiny/.github/workflows/full-tests-with-coverage.yml
T

87 lines
2.4 KiB
YAML

name: Tests
on: [push]
jobs:
test:
name: Run tests
strategy:
matrix:
include:
- test-name: ubuntu-22.04-python-3.9
os: ubuntu-22.04
python-version: "3.9"
- test-name: ubuntu-22.04-python-3.10
os: ubuntu-22.04
python-version: "3.10"
- test-name: ubuntu-22.04-python-3.11
os: ubuntu-22.04
python-version: "3.11"
- test-name: ubuntu-24.04-python-3.12
os: ubuntu-24.04
python-version: "3.12"
- test-name: ubuntu-24.04-python-3.13
os: ubuntu-24.04
python-version: "3.13"
runs-on: ${{ matrix.os }}
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Setup pebble
run: |
wget https://github.com/letsencrypt/pebble/releases/latest/download/pebble-linux-amd64.tar.gz
tar -xvzf pebble-linux-amd64.tar.gz -C /tmp
chmod 744 /tmp/pebble-linux-amd64/linux/amd64/pebble
/tmp/pebble-linux-amd64/linux/amd64/pebble -h || true
- name: Setup python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -U -r tests/requirements.txt
- name: Run tests with coverage
run: |
export ACME_TINY_PEBBLE_BIN="/tmp/pebble-linux-amd64/linux/amd64/pebble"
coverage run --source . --omit ./setup.py -m unittest tests
- name: Print coverage report
run: coverage report -m
- name: Upload coverage to coveralls.io
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_TOKEN }}
COVERALLS_SERVICE_NAME: github-actions
COVERALLS_FLAG_NAME: ${{ matrix.test-name }}
COVERALLS_PARALLEL: true
run: |
python -m pip install --upgrade coveralls
coveralls
coveralls:
name: Indicate completion to coveralls.io
needs: test
runs-on: ubuntu-latest
container: python:3-slim
steps:
- name: Finished
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
python -m pip install --upgrade coveralls
coveralls --service=github --finish