-
Notifications
You must be signed in to change notification settings - Fork 3
69 lines (64 loc) · 2.03 KB
/
python-package-conda.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
# configuration derived from q2-katharoseq
name: Python Package using Conda
on: [push]
jobs:
build-linux:
runs-on: ${{ matrix.os }}
strategy:
max-parallel: 5
matrix:
os: ["ubuntu-latest", "macos-latest"]
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8
- uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
python-version: ${{ matrix.python-version }}
- name: Add conda to system path
run: |
# $CONDA is an environment variable pointing to the root of the miniconda directory
echo $CONDA/bin >> $GITHUB_PATH
- name: Install QIIME 2 ${{ matrix.os }}
if: matrix.os == 'macos-latest'
shell: bash -l {0}
run: |
wget -q https://raw.githubusercontent.com/qiime2/environment-files/master/latest/staging/qiime2-latest-py38-osx-conda.yml
conda env create -q -n test-env --file qiime2-latest-py38-osx-conda.yml
- name: Install QIIME 2 ${{ matrix.os }}
if: matrix.os == 'ubuntu-latest'
shell: bash -l {0}
run: |
wget -q https://raw.githubusercontent.com/qiime2/environment-files/master/latest/staging/qiime2-latest-py38-linux-conda.yml
conda env create -q -n test-env --file qiime2-latest-py38-linux-conda.yml
- name: Install q2-greengenes2
source activate test-env
conda install flake8 pytest
pip install -e .
- name: Lint with flake8
run: |
source activate test-env
flake8 q2_gg2
- name: Test with pytest
run: |
source activate test-env
pytest
lint:
runs-on: ubuntu-latest
steps:
- name: flake8
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: install dependencies
run: |
python -m pip install --upgrade pip
- name: Check out repository code
uses: actions/checkout@v2
- name: lint
run: |
pip install -q flake8
flake8 q2_gg2