Skip to content

Updating PyMUSAS Development Requirements #333

Updating PyMUSAS Development Requirements

Updating PyMUSAS Development Requirements #333

Workflow file for this run

name: CI
on:
workflow_dispatch: # Manually trigger a workflow run using the GitHub API, GitHub CLI, or the GitHub UI.
push:
pull_request:
release:
types: [published]
jobs:
Validate-CITATION-cff:
runs-on: ubuntu-latest
name: Validate CITATION.cff
steps:
- name: Checkout Repository
uses: actions/checkout@v5
- name: Validate CITATION.cff
id: validate_cff
uses: dieghernan/cff-validator@v4
with:
citation-path: "CITATION.cff"
- name: Upload cff-validator error artifact if failed to validate
uses: actions/upload-artifact@v4
if: ${{ failure() && steps.validate_cff.conclusion == 'failure' }}
with:
name: citation-cff-errors
path: citation_cff.md
overwrite: true
if-no-files-found: warn
checks:
name: checks
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13"]
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/checkout@v5
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
id: python-setup
with:
python-version: ${{ matrix.python-version }}
- name: Install uv
uses: astral-sh/setup-uv@v7
id: setup-uv
with:
# Install a specific version of uv.
version: "0.9.6"
enable-cache: true
restore-cache: true
save-cache: true
prune-cache: true
cache-dependency-glob: "uv.lock"
- name: Install the project
run: uv sync --locked
- name: check uv cache is working
if: steps.setup-uv.outputs.cache-hit == 'true'
run: echo "uv cache was restored"
- name: isort
run: uv run isort --check-only pymusas tests scripts
- name: flake8 Linux
if: ${{ runner.os == 'macOS' || runner.os == 'Linux' }}
run: |
uv run flake8 --config ./.flake8 pymusas tests scripts
- name: flake8 Window
if: ${{ runner.os == 'Windows' }}
run: |
uv run flake8 --config .\.flake8 pymusas tests scripts
- name: Cache mypy
uses: actions/cache@v4
with:
path: ./.mypy_cache
key: ${{ runner.os }}-${{ steps.python-setup.outputs.python-version }}-${{ hashFiles('uv.lock') }}
- name: mypy
run: uv run mypy