Fix running tests in environment with NO_COLOR=1 #98
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: | |
lint: | |
name: "π Lint Python modules" | |
runs-on: "ubuntu-latest" | |
strategy: | |
matrix: | |
python-version: | |
- "3.10" | |
steps: | |
- uses: "actions/checkout@master" | |
- name: "π Set up Python ${{ matrix.python-version }}" | |
uses: "actions/setup-python@v2" | |
with: | |
python-version: "${{ matrix.python-version }}" | |
- name: "π Display Python version" | |
run: "python --version" | |
- name: "π Install dependencies" | |
run: "python -m pip install --user --pre black flake8 mypy types-PyYAML" | |
- name: "π Run mypy" | |
run: "python -m mypy ." | |
- name: "π Run flake8" | |
run: "python -m flake8" | |
- name: "π Run black" | |
run: "python -m black --check ." | |
test: | |
name: "π Test Python modules" | |
runs-on: "ubuntu-latest" | |
strategy: | |
matrix: | |
python-version: | |
- "3.6" | |
- "3.7" | |
- "3.8" | |
- "3.9" | |
- "3.10" | |
dependencies: | |
- "" | |
- "colorama" | |
steps: | |
- uses: "actions/checkout@master" | |
- name: "π Set up Python ${{ matrix.python-version }}" | |
uses: "actions/setup-python@v2" | |
with: | |
python-version: "${{ matrix.python-version }}" | |
- name: "π Display Python version" | |
run: "python --version" | |
- name: "π Install dependencies" | |
run: "python -m pip install --user pytest ${{ matrix.dependencies }}" | |
- name: "π Run pytest" | |
run: "python -m pytest" | |
publish: | |
name: "π¦ Publish Python distributions" | |
runs-on: "ubuntu-latest" | |
strategy: | |
matrix: | |
python-version: | |
- "3.10" | |
steps: | |
- uses: "actions/checkout@master" | |
- name: "π Set up Python ${{ matrix.python-version }}" | |
uses: "actions/setup-python@v2" | |
with: | |
python-version: "${{ matrix.python-version }}" | |
- name: "π Display Python version" | |
run: "python --version" | |
- name: "π Install wheel" | |
run: "python -m pip install wheel --user" | |
- name: "π Build a binary wheel and a source tarball" | |
run: "python setup.py sdist bdist_wheel" | |
- name: "π¦ Publish distribution to PyPI" | |
uses: "pypa/gh-action-pypi-publish@release/v1" | |
if: "startsWith(github.ref, 'refs/tags')" | |
with: | |
password: "${{ secrets.pypi_password }}" |