Skip to content

Commit 1f4ba0e

Browse files
Create python-package-conda.yml
1 parent e2bb1b4 commit 1f4ba0e

1 file changed

Lines changed: 36 additions & 0 deletions

File tree

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

0 commit comments

Comments
 (0)