Adds initial CI suport #9
Workflow file for this run
This file contains hidden or 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: Unit Test | |
on: | |
pull_request: | |
jobs: | |
unit_tests: | |
runs-on: ubuntu-latest | |
timeout-minutes: 15 | |
strategy: | |
matrix: | |
python-version: ['3.10'] | |
steps: | |
- name: Check out repo | |
uses: actions/checkout@v4 | |
- name: Create conda env | |
run: conda create -n forge python=${{ matrix.python-version }} --yes | |
- name: Conda init | |
run: eval "$(conda shell.bash hook)" && conda activate forge | |
- name: Activate conda env | |
run: conda activate forge | |
# remove the next two steps | |
- name: Pip debug | |
run: python -m pip debug --verbose | |
- name: Check Python version | |
run: python --version | |
- name: Setup conda env | |
uses: conda-incubator/setup-miniconda@v2 | |
with: | |
auto-update-conda: true | |
miniconda-version: "latest" | |
activate-environment: test | |
python-version: ${{ matrix.python-version }} | |
- name: Update pip | |
run: python -m pip install --upgrade pip | |
- name: Install dependencies | |
run: | | |
python -m pip install -e ".[dev]" | |
# Will have to pin until monarch wheel is reasonable | |
pip install torch==2.9.0.dev20250815+cpu --index-url https://download.pytorch.org/whl/nightly/cpu | |
python -m pip install --no-build-isolation --verbose assets/wheels/monarch_no_torch-0.1.0.dev20250815-cp310-cp310-linux_x86_64.whl | |
- name: Run unit tests with coverage | |
run: pytest tests --cov=. --cov-report=xml --durations=20 -vv | |
- name: Upload Coverage to Codecov | |
uses: codecov/codecov-action@v3 |