Define project #2
Workflow file for this run
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: CI | |
on: | |
pull_request: | |
push: | |
branches: | |
- main | |
schedule: | |
- cron: "0 13 * * 1" # Every Monday at 9AM EST | |
jobs: | |
pre-commit: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Checkout submodule | |
uses: actions/checkout@v4 | |
with: | |
repository: invrs-io/totypes | |
path: totypes | |
token: ${{ secrets.INVRSIO_PAT }} | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.10" | |
cache: "pip" | |
cache-dependency-path: pyproject.toml | |
- name: Test pre-commit hooks | |
run: | | |
python -m pip install --upgrade pip | |
pip install pre-commit | |
pre-commit run -a | |
validate-docstrings: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Checkout submodule | |
uses: actions/checkout@v4 | |
with: | |
repository: invrs-io/totypes | |
path: totypes | |
token: ${{ secrets.INVRSIO_PAT }} | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.10" | |
cache: "pip" | |
cache-dependency-path: pyproject.toml | |
- name: Setup environment | |
run: | | |
python -m pip install --upgrade pip | |
pip install "totypes/" | |
pip install ".[tests,dev]" | |
- name: Validate docstrings | |
run: | | |
darglint src --strictness=short --ignore-raise=ValueError | |
tests: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Checkout submodule | |
uses: actions/checkout@v4 | |
with: | |
repository: invrs-io/totypes | |
path: totypes | |
token: ${{ secrets.INVRSIO_PAT }} | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.10" | |
cache: "pip" | |
cache-dependency-path: pyproject.toml | |
- name: Setup environment | |
run: | | |
python -m pip install --upgrade pip | |
pip install "totypes/" | |
pip install ".[tests,dev]" | |
- name: Run Python tests | |
run: | | |
pytest --cov=invrs_gym tests |