Skip to content

CI

CI #437

Workflow file for this run

name: CI
on:
pull_request:
push:
branches:
- main
schedule:
- cron: "0 13 * * 1" # Every Monday at 9AM EST
jobs:
lint-and-typecheck:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup python
uses: actions/setup-python@v5
with:
python-version: "3.10"
cache: "pip"
cache-dependency-path: pyproject.toml
- name: Setup environment
run: |
python -m pip install --upgrade pip
pip install ".[dev,jeig]"
- name: Lint Python files
run: |
find . -name "*.py" | xargs black --check
find . -name "*.py" | xargs isort --profile black --check-only
- name: Typecheck with mypy
run: |
mypy src
mypy examples
- name: Validate docstrings
run: |
darglint src --strictness=short --ignore-raise=ValueError
darglint examples --strictness=short --ignore-raise=ValueError
test-fmmax:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup python
uses: actions/setup-python@v5
with:
python-version: "3.10"
cache: "pip"
cache-dependency-path: pyproject.toml
- name: Setup environment
run: |
python -m pip install --upgrade pip
pip install ".[tests,dev]"
- name: Test fmmax
run: pytest tests/fmmax
test-fmmax-jeig:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup python
uses: actions/setup-python@v5
with:
python-version: "3.10"
cache: "pip"
cache-dependency-path: pyproject.toml
- name: Setup environment
run: |
python -m pip install --upgrade pip
pip install ".[tests,dev,jeig]"
- name: Test fmmax
run: pytest tests/fmmax
test-grcwa:
runs-on: ubuntu-latest
timeout-minutes: 2
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup python
uses: actions/setup-python@v5
with:
python-version: "3.10"
cache: "pip"
cache-dependency-path: pyproject.toml
- name: Setup environment
run: |
python -m pip install --upgrade pip
pip install ".[tests,dev]"
- name: Test grcwa
run: pytest tests/grcwa
test-examples:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup python
uses: actions/setup-python@v5
with:
python-version: "3.10"
cache: "pip"
cache-dependency-path: pyproject.toml
- name: Setup environment
run: |
python -m pip install --upgrade pip
pip install ".[tests,dev]"
- name: Test examples
run: python -m pytest tests/examples