Skip to content

Commit eca11d9

Browse files
authored
Create python-package-conda.yml
1 parent afa8129 commit eca11d9

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Python Package using Conda
2+
3+
on: [push]
4+
5+
jobs:
6+
build-linux:
7+
runs-on: ubuntu-latest
8+
strategy:
9+
max-parallel: 5
10+
11+
steps:
12+
- uses: actions/checkout@v2
13+
- name: Set up Python 3.8
14+
uses: actions/setup-python@v2
15+
with:
16+
python-version: 3.8
17+
- name: Install dependencies
18+
run: |
19+
# $CONDA is an environment variable pointing to the root of the miniconda directory
20+
$CONDA/bin/conda env update --file environment.yml --name base
21+
- name: Lint with flake8
22+
run: |
23+
$CONDA/bin/conda install flake8
24+
# stop the build if there are Python syntax errors or undefined names
25+
$CONDA/bin/flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
26+
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
27+
$CONDA/bin/flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
28+
- name: Test with pytest
29+
run: |
30+
conda install pytest
31+
$CONDA/bin/pytest

0 commit comments

Comments
 (0)