Skip to content

Commit

Permalink
Use conda-incubator/setup-miniconda to setup GH actions
Browse files Browse the repository at this point in the history
  • Loading branch information
mjwen committed Dec 3, 2020
1 parent d69afb2 commit 6769140
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 16 deletions.
23 changes: 11 additions & 12 deletions .github/workflows/pythonpackage.yml
Expand Up @@ -13,32 +13,31 @@ jobs:
python-version: [3.6, 3.7, 3.8]

steps:
- uses: actions/checkout@v1
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
- uses: actions/checkout@v2

- uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
python-version: ${{ matrix.python-version }}
- name: Include $CONDA in $PATH
run: echo ::add-path::$CONDA/bin

- name: Install dependencies
shell: bash -l {0}
run: |
conda env update --file environment.yml
python -m pip install --upgrade pip
pip install flake8 pytest
pip install -e .
conda install pytorch==1.6.0 torchvision cpuonly -c pytorch
conda install dgl==0.5.0 -c dglteam
conda install pymatgen==2020.8.13 -c conda-forge
conda install rdkit==2020.03.5 -c conda-forge
conda install openbabel==3.1.1 -c conda-forge
- name: Lint with flake8
shell: bash -l {0}
run: |
pip install flake8
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest
shell: bash -l {0}
run: |
pip install pytest
# ignore tests in "tests/prediction/". They need the pre-trained
# models, but these are stored as LFS on GitHub and Action cannot get
# access to it.
Expand Down
6 changes: 2 additions & 4 deletions binder/environment.yml
@@ -1,14 +1,12 @@
name: bondnet
channels:
- conda-forge
- pytorch
- dglteam
- conda-forge
- defaults
dependencies:
- pip
- pymatgen==2020.8.13
- rdkit==2020.03.5
- openbabel==3.1.1
- pytorch==1.6.0
- torchvision
- dgl==0.5.0
- dgl==0.5.2

0 comments on commit 6769140

Please sign in to comment.