Skip to content

Slipmap

Slipmap #23

Workflow file for this run

# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: tests
on:
push:
branches: [master, main]
paths: ["**.py"]
pull_request:
paths: ["**.py"]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.9", "3.10", "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
python -m pip install xiplot pytest pytest-cov
python -m pip install -e .
- name: Test with pytest
run: |
pytest --cov-report term --cov=slisemap_interactive --cov-fail-under=70
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.x"
- run: python -m pip install --upgrade pip build
- name: Build package
run: |
rm -f dist/*.whl
python -m build
python -c "import os, glob; assert os.path.getsize(glob.glob('dist/*.whl')[-1]) > 10_000"
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.x"
- run: python -m pip install --upgrade pip ruff
- name: Lint with Ruff
run: |
ruff check --output-format=github
ruff format --check