[pre-commit.ci] pre-commit autoupdate #321
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: Test code | |
env: | |
CI_FORCE_COLORS_POETRY: --ansi | |
CI_FORCE_COLORS_PYTEST: --color yes | |
on: # yamllint disable-line rule:truthy | |
workflow_dispatch: | |
push: | |
tags: | |
- "!*" | |
branches: | |
- main | |
- "test-me-*" | |
pull_request: | |
branches: | |
- "**" | |
jobs: | |
build: | |
name: Tests on ${{ matrix.os }} with python ${{ matrix.python-version }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: ["ubuntu-latest", "windows-latest", "macos-latest"] | |
python-version: ["3.8", "3.9", "3.10", "3.11"] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Fetch origin/main | |
#: https://github.com/Bachmann1234/diff_cover#troubleshooting | |
run: git fetch --no-tags origin main:refs/remotes/origin/main | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Display Python version | |
run: python --version | |
- name: Upgrade pip | |
run: python -m pip install --upgrade pip | |
- name: Install tox | |
run: python -m pip install --upgrade tox | |
- name: Run tests with tox | |
run: tox -m py${{ matrix.python-version }} |