From 0ae67eea18e47201e1e81e30880ae7ac75b95251 Mon Sep 17 00:00:00 2001 From: Murat Keceli Date: Tue, 19 Sep 2023 21:11:17 -0500 Subject: [PATCH 1/2] Add github action --- .github/workflows/install.yml | 40 +++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .github/workflows/install.yml 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 From aa6cef39eb8b9303b56d8d898fd944c9b7e60176 Mon Sep 17 00:00:00 2001 From: Murat Keceli Date: Tue, 19 Sep 2023 21:14:04 -0500 Subject: [PATCH 2/2] Add status badge for the gh action --- README.md | 1 + 1 file changed, 1 insertion(+) 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)