feat: add ruff formatting check (#4) #3
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: Run tests | |
on: | |
pull_request: | |
push: | |
branches: [ main ] | |
tags: [ 'v*.*.*' ] | |
permissions: | |
contents: read | |
jobs: | |
test: | |
name: Test | |
strategy: | |
matrix: | |
os: [macos-latest, ubuntu-latest] | |
python: ["3.12"] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python }} | |
- name: Install package and test dependencies | |
run: | | |
export PIP_INTEROP_ENABLED=compatible | |
export PIP_SCRIPT=scripts/pip_verbose.sh | |
$CONDA/bin/conda env update --file environment.yml --name base | |
python -m pip install --upgrade pip | |
python -m pip install ".[test]" | |
- name: Run tests | |
run: | | |
$CONDA/bin/pytest |