Skip to content

Commit 48bb116

Browse files
authored
Create python-package-conda.yml
1 parent 7ccffa8 commit 48bb116

File tree

1 file changed

+42
-0
lines changed

1 file changed

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

0 commit comments

Comments
 (0)