Make colorful/indented output optional, decrease indent #349
Workflow file for this run
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, pull_request] | |
jobs: | |
test: | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: [3.7, 3.8, 3.9, '3.10', '3.11', pypy-3.9-v7.x] | |
os: [ubuntu-latest, windows-latest, macos-latest] | |
include: | |
- python-version: 3.7 | |
py: py37 | |
- python-version: 3.8 | |
py: py38 | |
- python-version: 3.9 | |
py: py39 | |
- python-version: '3.10' | |
py: py310 | |
- python-version: '3.11' | |
py: py311 | |
- python-version: pypy-3.9-v7.x | |
py: pypy3 | |
# Just to slim down the test matrix: | |
exclude: | |
- python-version: 3.8 | |
os: macos-latest | |
- python-version: 3.8 | |
os: windows-latest | |
- python-version: 3.9 | |
os: ubuntu-latest | |
- python-version: 3.10 | |
os: macos-latest | |
- python-version: 3.10 | |
os: windows-latest | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade hatch | |
- name: Run tests | |
run: | | |
hatch run +py=${{ matrix.py }} +type= test:with-coverage | |
- name: Run integration tests | |
run: | | |
hatch run +py=${{ matrix.py }} +type= integration:test | |
shell: bash | |
- name: Upload Codecov Results | |
if: success() | |
uses: codecov/codecov-action@v3 | |
with: | |
file: ./coverage.xml | |
flags: unittests | |
name: ${{ matrix.os }}/${{ matrix.py }} | |
fail_ci_if_error: false | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' | |
- name: Install Python dependencies | |
run: | | |
python -m pip install --upgrade hatch | |
- name: Setup Node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
- name: Check with black + isort | |
if: always() | |
run: hatch run style:format && git diff --exit-code | |
- name: Check with flake8 | |
if: always() | |
run: hatch run style:lint | |
- name: Check with mypy | |
if: always() | |
run: hatch run types:check | |
- name: Check Markdown style | |
if: always() | |
run: hatch run lint:markdown | |
- name: Check JS style | |
if: always() | |
run: hatch run lint:js | |
- name: Check CSS style | |
if: always() | |
run: hatch run lint:css | |
- name: Check spelling | |
if: always() | |
run: hatch run lint:spelling | |
package: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' | |
- name: Install Hatch | |
run: | | |
python -m pip install -U hatch | |
- name: Build package | |
run: | | |
hatch build | |
- name: Check packaged files | |
shell: bash -e -x {0} | |
run: | | |
expected_wheel=(-emkdocs/{templates/sitemap.xml,config/base.py,py.typed,contrib/search/lunr-language/lunr.nl.js,themes/{mkdocs,readthedocs}/{base.html,locales/{de,es}/LC_MESSAGES/messages.mo}}) | |
expected_sdist=("${expected_wheel[@]}" -e{pyproject.toml,hatch_build.py}) | |
test "$(tar -ztf dist/mkdocs-*.tar.gz | grep -F "${expected_sdist[@]}" | tee /dev/stderr | wc -l)" -eq "${#expected_sdist[@]}" | |
test "$(unzip -l dist/mkdocs-*any.whl | grep -F "${expected_wheel[@]}" | tee /dev/stderr | wc -l)" -eq "${#expected_wheel[@]}" |