Skip to content

Commit e0629f5

Browse files
committed
github actions
1 parent a39e57f commit e0629f5

File tree

1 file changed

+12
-22
lines changed

1 file changed

+12
-22
lines changed

.github/workflows/python-package-conda.yml

Lines changed: 12 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -3,50 +3,40 @@ name: Python Package using Conda
33
on: [push]
44

55
jobs:
6-
build:
7-
runs-on: ${{ matrix.os }}
6+
build-linux:
7+
runs-on: ubuntu-latest
88
strategy:
9-
matrix:
10-
os: [ubuntu-latest, windows-latest, macos-latest]
11-
python-version: ["3.8", "3.9", "3.10", "3.11"]
129
max-parallel: 5
1310

1411
steps:
1512
- uses: actions/checkout@v4
16-
17-
- name: Set up Python ${{ matrix.python-version }}
13+
- name: Set up Python 3.10
1814
uses: actions/setup-python@v3
1915
with:
20-
python-version: ${{ matrix.python-version }}
21-
22-
- name: Set up Conda
23-
shell: bash
16+
python-version: '3.10'
17+
- name: Add conda to system path
2418
run: |
25-
echo "Adding Conda to system path"
26-
echo "$CONDA/bin" >> $GITHUB_PATH
27-
19+
# $CONDA is an environment variable pointing to the root of the miniconda directory
20+
echo $CONDA/bin >> $GITHUB_PATH
2821
- name: Install dependencies
29-
shell: bash
3022
run: |
3123
conda env update --file environment.yaml --name base
3224
python -m pip install --upgrade pip
3325
pip install -e .
34-
3526
- name: Lint with flake8
36-
shell: bash
3727
run: |
38-
conda install -y flake8
28+
conda install flake8
29+
# stop the build if there are Python syntax errors or undefined names
3930
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
4032
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
41-
4233
- name: Test with pytest
43-
shell: bash
4434
run: |
45-
conda install -y pytest pytest-cov
35+
conda install pytest pytest-cov
4636
pytest --cov=codebase --cov-report=xml
47-
4837
- name: Upload coverage reports to Codecov
4938
uses: codecov/codecov-action@v4.0.1
5039
with:
5140
token: ${{ secrets.CODECOV_TOKEN }}
5241
slug: nlsschim/codebase
42+

0 commit comments

Comments
 (0)