Skip to content

Commit

Permalink
BLD: Small tweaks to GH Actions workflows (#502)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
fedarko authored Mar 25, 2021
1 parent 1939236 commit 29fc915
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 17 deletions.
26 changes: 15 additions & 11 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -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:
Expand All @@ -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:
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down
10 changes: 6 additions & 4 deletions .github/workflows/standalone.yml
Original file line number Diff line number Diff line change
@@ -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:
Expand All @@ -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
Expand Down Expand Up @@ -42,15 +44,15 @@ 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"

- name: Install EMPress
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: >
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -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)

<!---Empress Logo--->
Expand Down

0 comments on commit 29fc915

Please sign in to comment.