Skip to content

[pre-commit.ci] pre-commit autoupdate #70

[pre-commit.ci] pre-commit autoupdate

[pre-commit.ci] pre-commit autoupdate #70

Workflow file for this run

name: CI
on:
workflow_dispatch:
push:
branches:
- main
# - '*.x' for latest “.x” branch e.g, (0.1.x)
paths-ignore:
- "**.md"
pull_request:
branches:
- main
# - '*.x' for latest “.x” branch e.g, (0.1.x)
paths-ignore:
- "**.md"
release:
types: [published]
jobs:
Testing:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
python-version: [3.7, 3.8, 3.9, "3.10"]
os: [ubuntu-latest, macOS-latest, windows-latest]
steps:
- name: Checkout repo
uses: actions/checkout@v2
- name: Set Up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Display Python version
run: python -c "import sys; print(sys.version)"
- name: Install and setup PDM
run: |
python -m pip install --upgrade pip
pip install pdm==2.0.2
- name: Set up PDM cache for Python dependencies
uses: actions/cache@v2
if: matrix.os != 'windows-latest'
with:
path: .venv
key: venv-${{ runner.os }}-${{ matrix.python-version }}-f-${{ hashFiles('**/pdm.lock') }}
- name: Install dependencies
run: pdm install
- name: Run tests with coverage
run: pdm run pytest -svv --cov=./ --cov-report=xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v2
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.10'
with:
name: sync with pdm # optional
fail_ci_if_error: true # optional (default = false)
verbose: true # optional (default = false)