Skip to content

Fix running tests in environment with NO_COLOR=1 #98

Fix running tests in environment with NO_COLOR=1

Fix running tests in environment with NO_COLOR=1 #98

Workflow file for this run

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 }}"