Skip to content

Add units

Add units #66

Workflow file for this run

name: Run Tests and Linting
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
validate-lock-file:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Pixi
uses: prefix-dev/setup-pixi@v0.8.1
with:
pixi-version: v0.63.2
environments: dev
cache: false
- name: Check if lock file is up to date
run: pixi lock --check
# Test using pixi (recommended)
test-pixi:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
steps:
- uses: actions/checkout@v4
- name: Setup Pixi
uses: prefix-dev/setup-pixi@v0.8.1
with:
pixi-version: v0.63.2
environments: dev
cache: false
- name: Lint with flake8
run: pixi run -e dev lint
- name: Run tests with coverage
run: pixi run -e dev test-cov-ci
- name: Run pre-commit checks
run: pixi run -e dev pre-commit
# Test using pip (for compatibility)
test-pip:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.11", "3.12"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install .[dev]
- name: Lint with flake8
run: |
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest and coverage
run: |
pytest --cov=src/arroyopy --cov-report=term --cov-fail-under=90