diff --git a/.github/workflows/install.yml b/.github/workflows/install.yml new file mode 100644 index 00000000..be27f557 --- /dev/null +++ b/.github/workflows/install.yml @@ -0,0 +1,40 @@ +name: Set up Conda environment and run tests + +on: [push, pull_request, workflow_dispatch] + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout code with submodules + uses: actions/checkout@v2 + with: + submodules: recursive # Ensure submodules are checked out + + - name: Setup Miniconda + uses: conda-incubator/setup-miniconda@v2 + with: + activate-environment: "" + auto-activate-base: true + + - name: Update Conda and Install Dependencies + shell: bash -l {0} + run: | + conda update -y -n base conda + conda install -y -n base conda-libmamba-solver + conda install -y anaconda-client -n base + conda config --set solver libmamba + conda env create -y auto-mech/amech-deps + conda activate amech-deps + conda info + conda list + - name: Activate environment, install other dependencies and run pytest on submodules + shell: bash -l {0} + continue-on-error: false + run: | + conda activate amech-deps + pip install git+https://github.com/Auto-Mech/autoio.git@dev#subdirectory=autoio-base + pip install git+https://github.com/Auto-Mech/autoio.git@dev#subdirectory=autoio-interfaces + pip install . + pytest diff --git a/README.md b/README.md index 96f5b22a..66695d7c 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,6 @@ # Library: AutoChem [//]: # (Badges) +[![Set up Conda environment and run tests](https://github.com/Auto-Mech/autochem/actions/workflows/install.yml/badge.svg)](https://github.com/Auto-Mech/autochem/actions/workflows/install.yml) [![CircleCI](https://circleci.com/gh/Auto-Mech/automol/tree/dev.svg?style=shield)](https://circleci.com/gh/Auto-Mech/autoio/tree/dev) [![Anaconda-Server Badge](https://anaconda.org/auto-mech/automol/badges/version.svg)](https://anaconda.org/auto-mech/autoio) [![Anaconda-Server Badge](https://anaconda.org/auto-mech/automol/badges/platforms.svg)](https://anaconda.org/auto-mech/autoio)