Skip to content

Optimize constructor links (#787) #2436

Optimize constructor links (#787)

Optimize constructor links (#787) #2436

Workflow file for this run

name: Unit tests and release
on:
push:
branches: [ master ]
tags:
- '*'
pull_request:
branches: [ master ]
jobs:
unit_tests:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: [pypy-3.7, 3.7, 3.8, 3.9, '3.10', 3.11, '3.12', '3.13.0-alpha.5']
os: [ubuntu-20.04]
include:
- os: windows-latest
python-version: 3.11
- os: macos-latest
python-version: 3.11
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install tox
run: |
python -m pip install --upgrade pip tox
- name: Log system information
run: |
test -r /etc/os-release && sh -c '. /etc/os-release && echo "OS: $PRETTY_NAME"'
python --version
python -c "print('\nENVIRONMENT VARIABLES\n=====================\n')"
python -c "import os; [print(f'{k}={v}') for k, v in os.environ.items()]"
- name: Run unit tests
run: |
tox -e test
- name: Run unit tests with latest Twisted version (only for python 3.8 and later)
if: matrix.python-version != '3.7' && matrix.python-version != 'pypy-3.7'
run: |
tox -e test-latest-twisted
- name: Publish code coverage
uses: codecov/codecov-action@v4
with:
fail_ci_if_error: true
files: ./coverage.xml
name: unit-${{ matrix.os }}-${{matrix.python-version}}
# Check the secret defined in GHA here
# https://github.com/twisted/pydoctor/settings/secrets/actions
# And get it from Codecov.io here
# https://app.codecov.io/gh/twisted/pydoctor/settings
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true
release:
needs: [unit_tests]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.9
uses: actions/setup-python@v5
with:
python-version: 3.9
- name: Log system information
run: |
test -r /etc/os-release && sh -c '. /etc/os-release && echo "OS: $PRETTY_NAME"'
python --version
python -c "print('\nENVIRONMENT VARIABLES\n=====================\n')"
python -c "import os; [print(f'{k}={v}') for k, v in os.environ.items()]"
- name: Install deps
run: |
python -m pip install --upgrade pip setuptools wheel
- name: Build pydoctor
run: |
python setup.py --quiet build check sdist bdist_wheel
ls -alh ./dist/
- name: Publish pydoctor to PyPI on tags
if: startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN }}