Skip to content

Bump pypa/gh-action-pypi-publish from 1.9.0 to 1.10.1 in the patches-and-minor-upgrades group across 1 directory #394

Bump pypa/gh-action-pypi-publish from 1.9.0 to 1.10.1 in the patches-and-minor-upgrades group across 1 directory

Bump pypa/gh-action-pypi-publish from 1.9.0 to 1.10.1 in the patches-and-minor-upgrades group across 1 directory #394

Workflow file for this run

---
name: Testing
on:
push:
pull_request:
workflow_dispatch:
jobs:
pytest:
name: Python ${{ matrix.python-version }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
id: python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Set pip cache dir
id: pip-cache
run: |
echo "dir=$(pip cache dir)" >> $GITHUB_OUTPUT
- name: Restore cached Python pip packages
uses: actions/cache@v4
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: pip-${{ runner.os }}-v3-${{ steps.python.outputs.python-version }}-${{ hashFiles('.github/workflows/requirements.txt') }}
restore-keys: |
pip-${{ runner.os }}-v3-${{ steps.python.outputs.python-version }}-
- name: Install Poetry 1.5.1
if: ${{ matrix.python-version == '3.7' }}
uses: snok/install-poetry@76e04a911780d5b312d89783f7b1cd627778900a #1.4.1
with:
version: 1.5.1
virtualenvs-create: true
virtualenvs-in-project: true
- name: Install workflow dependencies
if: ${{ matrix.python-version != '3.7' }}
run: |
pip install -r .github/workflows/requirements.txt
poetry config virtualenvs.create true
poetry config virtualenvs.in-project true
- name: Restore cached Python venv
id: cached-poetry-dependencies
uses: actions/cache@v4
with:
path: .venv
key: >-
venv-${{ runner.os }}-v3-${{ steps.python.outputs.python-version }}-${{ hashFiles('poetry.lock') }}
venv-${{ runner.os }}-v3-${{ steps.python.outputs.python-version }}-
- name: Install dependencies
run: poetry install --no-interaction
- name: Run pytest
run: poetry run pytest --cov certbot_dns_exonet tests
- name: Upload coverage artifact
uses: actions/upload-artifact@v4
with:
name: coverage-${{ matrix.python-version }}
path: .coverage
include-hidden-files: true
if-no-files-found: error
coverage:
runs-on: ubuntu-latest
needs: pytest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Download coverage data
uses: actions/download-artifact@v4
- name: Set up Python 3.11
id: python
uses: actions/setup-python@v5
with:
python-version: 3.11
- name: Set pip cache dir
id: pip-cache
run: |
echo "dir=$(pip cache dir)" >> $GITHUB_OUTPUT
- name: Restore cached Python pip packages
uses: actions/cache@v4
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: pip-${{ runner.os }}-v3-${{ steps.python.outputs.python-version }}-${{ hashFiles('.github/workflows/requirements.txt') }}
restore-keys: |
pip-${{ runner.os }}-v3-${{ steps.python.outputs.python-version }}-
- name: Install workflow dependencies
run: |
pip install -r .github/workflows/requirements.txt
poetry config virtualenvs.create true
poetry config virtualenvs.in-project true
- name: Restore cached Python venv
id: cached-poetry-dependencies
uses: actions/cache@v4
with:
path: .venv
key: >-
venv-${{ runner.os }}-v3-${{ steps.python.outputs.python-version }}-${{ hashFiles('poetry.lock') }}
venv-${{ runner.os }}-v3-${{ steps.python.outputs.python-version }}-
- name: Install dependencies
run: poetry install --no-interaction
- name: Process coverage results
run: |
poetry run coverage combine coverage*/.coverage*
poetry run coverage xml -i
- name: Upload coverage report
uses: codecov/codecov-action@e28ff129e5465c2c0dcc6f003fc735cb6ae0c673 #4.5.0
with:
token: ${{ secrets.CODECOV_TOKEN }}