Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI fixes for conda forge #29

Merged
merged 17 commits into from
Oct 19, 2023
35 changes: 20 additions & 15 deletions .github/workflows/CI.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,16 @@ on:
- "main"
schedule:
- cron: "0 0 * * *"
workflow_dispatch:

concurrency:
group: "${{ github.workflow }}-${{ github.ref }}"
cancel-in-progress: true

defaults:
run:
shell: bash -l {0}


jobs:
test:
Expand All @@ -18,13 +28,13 @@ jobs:
fail-fast: false
matrix:
os: [macOS-latest, ubuntu-latest]
python-version: [3.9, "3.10"]
python-version: ["3.10", "3.11"]

steps:
- uses: actions/checkout@v3
- name: Checkout Repository
uses: actions/checkout@v3

- name: Additional info about the build
shell: bash
run: |
uname -a
df -h
Expand All @@ -33,35 +43,30 @@ jobs:

# More info on options: https://github.com/conda-incubator/setup-miniconda
- name: Setup Micromamba
uses: mamba-org/provision-with-micromamba@main
uses: mamba-org/setup-micromamba@v1
with:
environment-file: devtools/conda-envs/test_env.yaml
environment-name: test
extra-specs: |
create-args: >-
python==${{ matrix.python-version }}

- name: Install package

# conda setup requires this special shell
shell: bash -l {0}
run: |
python -m pip install . --no-deps
micromamba list


- name: Run tests

# conda setup requires this special shell
shell: bash -l {0}

run: |
pytest -v --cov=mtenn --cov-report=xml --color=yes mtenn/tests/

- name: CodeCov
- name: Upload Code Coverage to Codecov
uses: codecov/codecov-action@v3
# Don't upload coverage scheduled or on fork
if: ${{ github.repository == 'choderalab/mtenn'
&& github.event != 'schedule' }}
uses: codecov/codecov-action@v1
&& github.event != 'schedule' }}
with:
file: ./coverage.xml
flags: unittests
name: codecov-${{ matrix.os }}-py${{ matrix.python-version }}
fail_ci_if_error: false
1 change: 0 additions & 1 deletion devtools/conda-envs/test_env.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
name: test
channels:
- conda-forge
- dglteam
dependencies:
- pytorch
- pytorch_geometric
Expand Down