Merge pull request #161 from miketheman/patch-1 #165
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: ci | |
on: | |
push: | |
branches: | |
- trunk | |
pull_request: | |
branches: | |
- trunk | |
jobs: | |
build: | |
name: python/${{ matrix.python }} tox/${{ matrix.TOX_ENV }} | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
python: ["3.8", "3.10", "3.11", "3.12"] | |
TOX_ENV: ["extras", "noextras", "mypy"] | |
include: | |
- python: "3.11" | |
TOX_ENV: "lint" | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v3 | |
with: | |
python-version: ${{ matrix.python }} | |
- name: Install graphviz | |
run: | | |
sudo apt-get install -y graphviz | |
dot -V | |
if: ${{ matrix.TOX_ENV == 'extras' }} | |
- name: Tox Run | |
run: | | |
pip install tox; | |
TOX_ENV="py$(echo ${{ matrix.python }} | sed -e 's/\.//g')-${{ matrix.TOX_ENV }}"; | |
echo "Starting: ${TOX_ENV} ${PUSH_DOCS}" | |
if [[ -n "${TOX_ENV}" ]]; then | |
tox -e "$TOX_ENV"; | |
if [[ "${{ matrix.TOX_ENV }}" != "mypy" && "${{ matrix.TOX_ENV }}" != "lint" ]]; then | |
tox -e coverage-report; | |
fi; | |
fi; | |
- name: Upload coverage report | |
if: ${{ matrix.TOX_ENV != 'mypy' }} | |
uses: codecov/[email protected] | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} |