Pre-commit autoupdate (#42) #178
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: | |
defaults: | |
run: | |
shell: bash -el {0} | |
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@v4 | |
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@25949dd7cbed1382ed14df19c63f04c72c72cd67 | |
with: | |
environment-file: environment.yml | |
create-args: >- | |
python=${{ matrix.python-version }} | |
pytest-emoji | |
pytest-md | |
- name: pip install | |
run: pip install -e . | |
- name: Run pytest | |
uses: pavelzw/pytest-action@v2 | |
pre-commit-checks: | |
name: "Linux - pre-commit checks - Python 3.10" | |
timeout-minutes: 30 | |
runs-on: ubuntu-latest | |
env: | |
PRE_COMMIT_USE_MICROMAMBA: 1 | |
steps: | |
- name: Checkout branch | |
uses: actions/checkout@v4 | |
- name: Set up micromamba | |
uses: mamba-org/setup-micromamba@875557da4ee020f18df03b8910a42203fbf02da1 | |
- name: Add micromamba to GITHUB_PATH | |
run: echo "${HOME}/micromamba-bin" >> "$GITHUB_PATH" | |
- 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] |