Skip to content

ci: use trusted publishing for PyPI #371

ci: use trusted publishing for PyPI

ci: use trusted publishing for PyPI #371

Workflow file for this run

name: Test
on: [push, pull_request]
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-22.04
- macos-latest
python-version:
- '3.8'
- '3.9'
- '3.10'
- '3.11'
- '3.12'
tidy-version:
- 5.6.0
include:
- os: ubuntu-22.04
python-version: '3.11'
tidy-version: 5.8.0
- os: ubuntu-20.04
python-version: '3.11'
tidy-version: os
name: ${{ matrix.os }}, Python ${{ matrix.python-version }}, tidy ${{ matrix.tidy-version }}
steps:
- uses: actions/checkout@v4
- name: Cache pip
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('**/requirements*.txt') }}
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install tidy
run: ./scripts/install-tidy.sh ${{ matrix.tidy-version }}
- name: Install pip dependencies
run: |
python -m pip install --upgrade pip wheel
pip install -r requirements.txt -r requirements-test.txt
- name: Install editable
run: pip install -e .
- name: Check used library
run: python -c 'import tidy.lib; print(tidy.lib._tidy.lib._name)'
- name: Check used library version
run: python -c 'import tidy.lib; print(tidy.lib.getTidyVersion())'
- name: Test
run: |
py.test --cov=tidy tidy
- name: Coverage
run: |
coverage xml
- uses: codecov/codecov-action@v4
with:
token: ${{secrets.CODECOV_TOKEN}}
flags: unittests
name: Python ${{ matrix.python-version }}, ${{ matrix.os }}, tidy ${{ matrix.tidy-version }}