From 29fc9159738bee4dc8b6ae47ea2ce90e0ac348ae Mon Sep 17 00:00:00 2001 From: Marcus Fedarko Date: Thu, 25 Mar 2021 13:54:58 -0700 Subject: [PATCH] BLD: Small tweaks to GH Actions workflows (#502) * BLD: Small tweaks to GH Actions workflows - Remove Node.js matrix for main CI, since the version number is hard-coded in anyway - Make some documentation consistent btwn YAML files (e.g. Qiime -> QIIME 2) - Rename CIs to just "Main CI" and "Standalone CI", which I think makes the README badges / etc. easier to interpret * BLD/DOC: add comments+tidy up the YAML files more * DOC: small typo fix --- .github/workflows/main.yml | 26 +++++++++++++++----------- .github/workflows/standalone.yml | 10 ++++++---- README.md | 4 ++-- 3 files changed, 23 insertions(+), 17 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index a1fe3f739..725732f24 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,4 +1,8 @@ -name: Empress CI +# Tests EMPress' Python and JS code within a QIIME 2 conda environment. +# Also lints and stylechecks the code (both Python and JS). +# When tests pass, this runs "make docs" to generate various test QIIME 2 +# visualizations (.qzv files) and uploads them to McHelper. +name: Main CI # Controls when the action will run. on: @@ -14,10 +18,6 @@ jobs: build: # The type of runner that the job will run on (available options are window/macOS/linux) runs-on: ubuntu-latest - # we can add more versions of node.js in the future - strategy: - matrix: - node-version: [14.x] # used in McHelper (similar to TRAVIS_PULL_REQUEST variable) env: @@ -30,10 +30,14 @@ jobs: with: persist-credentials: false fetch-depth: 0 - - - name: Set up Node.js enviroment + + - name: Set up Node.js uses: actions/setup-node@v1 with: + # Can use a matrix of Node.js versions in the future if desired; + # however, since Node.js should only be used when developing + # EMPress, it's not an urgent priority (and should likely be done + # separately from the Python CI stuff to save time) node-version: 14 - name: Install Node.js modules @@ -42,7 +46,7 @@ jobs: - name: Install flake8 run: conda run -n base pip install flake8 - - name: Run linters + - name: Run linting and stylechecking run: | conda run -n base make stylecheck @@ -53,12 +57,12 @@ jobs: python-version: 3.6 conda-channels: anaconda, conda-forge - - name: Create Qiime enviroment + - name: Create QIIME 2 conda environment run: | wget https://data.qiime2.org/distro/core/qiime2-2020.6-py36-linux-conda.yml - conda env create -n qiime2-dev --file qiime2-2020.6-py36-linux-conda.yml + conda env create -n qiime2-dev --file qiime2-2020.6-py36-linux-conda.yml - - name: Install Empress + - name: Install EMPress run: | conda run -n qiime2-dev pip uninstall emperor --yes conda run -n qiime2-dev pip install -e .[all] --verbose diff --git a/.github/workflows/standalone.yml b/.github/workflows/standalone.yml index bc6e6a43e..cdf5bf1df 100644 --- a/.github/workflows/standalone.yml +++ b/.github/workflows/standalone.yml @@ -1,4 +1,7 @@ -name: Empress Standalone CI +# Tests EMPress' Python code, when installed outside of a QIIME 2 conda +# environment. See https://github.com/biocore/empress/issues/496 for a +# description of why this is useful. +name: Standalone CI # Controls when the action will run. on: @@ -14,7 +17,6 @@ jobs: build: # The type of runner that the job will run on (available options are window/macOS/linux) runs-on: ubuntu-latest - # we can add more versions of node.js in the future strategy: matrix: # based roughly on https://github.com/conda-incubator/setup-miniconda#example-1-basic-usage @@ -42,7 +44,7 @@ jobs: shell: bash -l {0} run: conda install flake8 nose - - name: Install cython & numpy + - name: Install Cython & NumPy shell: bash -l {0} run: pip install cython "numpy >= 1.12.0" @@ -50,7 +52,7 @@ jobs: shell: bash -l {0} run: pip install -e .[all] - # tests that don't import qiime2 dependencies + # tests that don't import QIIME 2 dependencies - name: Run (non-QIIME 2) Python tests shell: bash -l {0} run: > diff --git a/README.md b/README.md index 556cdedc7..a9d60e699 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Empress -[![EMPress CI](https://github.com/biocore/empress/actions/workflows/main.yml/badge.svg)](https://github.com/biocore/empress/actions/workflows/main.yml) -[![EMPress Standalone CI](https://github.com/biocore/empress/actions/workflows/standalone.yml/badge.svg)](https://github.com/biocore/empress/actions/workflows/standalone.yml) +[![Main CI](https://github.com/biocore/empress/actions/workflows/main.yml/badge.svg)](https://github.com/biocore/empress/actions/workflows/main.yml) +[![Standalone CI](https://github.com/biocore/empress/actions/workflows/standalone.yml/badge.svg)](https://github.com/biocore/empress/actions/workflows/standalone.yml) [![PyPI](https://img.shields.io/pypi/v/empress.svg)](https://pypi.org/project/empress)