Skip to content

Avoid using environment in CI pipeline #9

Avoid using environment in CI pipeline

Avoid using environment in CI pipeline #9

Workflow file for this run

# Builds the python environment; linter and formatting via ruff; type annotations via pyright;
# tests via pytest; reports test coverage via pytest-cov.
name: build
on:
push:
branches: ['*']
pull_request:
workflow_dispatch:
jobs:
build_run_tests:
name: Python ${{ matrix.python-version }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
if: github.event.pull_request.draft == false
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: [3.9, 3.11]
fail-fast: false
defaults:
run:
shell: ${{ matrix.os == 'windows-latest' && 'pwsh' || 'bash' }} # Adjust shell based on OS
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: pip install -e .[dev]
- name: ruff
run: ruff check .
- name: pyright
run: pyright .
- name: pytest
run: pytest --cov harp