Skip to content

🚧 Pytest CI

🚧 Pytest CI #11

Workflow file for this run

# Build Workflow
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
name: πŸ“¦ Nested Dict Tools CI build
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build:
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
path: ~/.cache/pip
# - os: macos-latest
# path: ~/Library/Caches/pip
# - os: windows-latest
# path: ~\AppData\Local\pip\Cache
python-version: ["3.12", "3.13"] # ["3.10", "3.11", "3.12"]
runs-on: ${{ matrix.os }}
steps:
- name: πŸ›ŽοΈ Checkout
uses: actions/checkout@v4
- name: 🐍 Install uv with caching
uses: astral-sh/setup-uv@v3
with:
enable-cache: true
version: "0.5.4"
- name: 🐍 Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: πŸ’Ύ Setup pip cache
uses: actions/cache@v4
with:
path: ${{ matrix.path }}
key: ${{ runner.os }}-pip-${{ hashFiles('uv.lock') }}
restore-keys: ${{ runner.os }}-pip-
- name: πŸ“₯ Install the project
run: uv sync --all-extras --dev
- name: 🧹 Lint with ruff @chartboost
uses: chartboost/ruff-action@v1
continue-on-error: true
- name: πŸ“₯ Install pytest-action dependencies
run: |
pipx install pytest pytest-cov
uv pip install pytest-md pytest-emoji
- name: πŸ§ͺ Run pytest @pavelzw
uses: pavelzw/pytest-action@v2
with:
custom-arguments: "tests -rA --doctest-modules --cov=."
continue-on-error: true
- name: πŸ§ͺ Run Pytest with command
run: pytest tests -rA --doctest-modules --cov=.
continue-on-error: true
- name: πŸ“Š Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
# file: .coverage
verbose: true
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
- name: βœ… Pylance type checking @jakebailey
uses: jakebailey/pyright-action@v2
with:
pylance-version: latest-release
stats: true
# verbose: true
continue-on-error: true
# - name: πŸ“₯ Install public interface package
# run: |
# python -m pip install .
- name: βœ… Verify public API types with Pylance @jakebailey
uses: jakebailey/pyright-action@v2
with:
pylance-version: latest-release
verify-types: nested_dict_tools
# verbose: true
continue-on-error: true
- name: πŸ—οΈ Build
run: |
pipx install hatch
hatch build