Scheduled CI suite on main and dev branches #16
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: Scheduled CI suite on main and dev branches | |
on: | |
schedule: | |
- cron: "0 0 * * 0" | |
workflow_dispatch: # also allow manual trigger | |
jobs: | |
check: | |
name: Lint and check types | |
strategy: | |
fail-fast: false | |
matrix: | |
branch: ["main", "develop"] | |
python-version: ["3.9", "3.10", "3.11", "3.12"] | |
runs-on: "ubuntu-latest" | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: ${{ matrix.branch }} | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install ".[check,extra]" | |
- name: Lint with Ruff | |
run: ruff check metasyn | |
- name: Check types with MyPy | |
run: mypy metasyn | |
test: | |
name: Run test suite | |
strategy: | |
fail-fast: false | |
matrix: | |
branch: ["main", "develop"] | |
os: [ubuntu-latest] | |
python-version: ["3.9", "3.10", "3.11", "3.12"] | |
include: | |
- os: macos-latest | |
python-version: "3.12" | |
- os: windows-latest | |
python-version: "3.12" | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: ${{ matrix.branch }} | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install ".[test,extra]" | |
- name: Test with pytest | |
run: pytest tests | |
- name: Check notebook output | |
if: ${{ matrix.os != 'macos-latest' }} | |
run: pytest --nbval-lax examples | |
- name: Test basic example | |
run: python examples/basic_example.py | |
- name: Test CLI configuration example | |
run: | | |
pip install git+https://github.com/sodascience/metasyn-disclosure-control | |
pip install . | |
metasyn create-meta metasyn/demo/demo_titanic.csv --config examples/example_config.toml |