Enable pytest color output #164
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: | |
branches: | |
- main | |
pull_request: | |
jobs: | |
tests: | |
name: Tests - Python ${{ matrix.python-version }} - ${{ matrix.os }} | |
timeout-minutes: 10 | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ['3.6', '3.7', '3.8', '3.9', '3.10', '3.11'] | |
os: ['ubuntu-latest', 'windows-latest', 'macos-latest'] | |
steps: | |
- name: Checkout branch | |
uses: actions/checkout@v3 | |
with: | |
ref: ${{ github.head_ref }} | |
- name: Fetch full git history | |
run: git fetch --prune --unshallow | |
- name: Set up Micromamba env | |
uses: mamba-org/setup-micromamba@875557da4ee020f18df03b8910a42203fbf02da1 | |
with: | |
environment-file: environment.yml | |
create-args: >- | |
python=${{ matrix.python-version }} | |
pytest-emoji | |
pytest-md | |
- name: Run tests | |
run: pip install -e . | |
shell: micromamba-shell {0} | |
- name: Run pytest | |
uses: pavelzw/pytest-action@v2 | |
with: | |
custom-arguments: --color=yes | |
pre-commit-checks: | |
name: pre-commit checks | |
timeout-minutes: 10 | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout branch | |
uses: actions/checkout@v3 | |
with: | |
ref: ${{ github.head_ref }} | |
- name: Install Python 3.10 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.10" | |
- name: Run pre-commit checks | |
uses: pre-commit/[email protected] |