-
Notifications
You must be signed in to change notification settings - Fork 4
60 lines (52 loc) · 1.65 KB
/
python-package-conda.yml
File metadata and controls
60 lines (52 loc) · 1.65 KB
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
name: Unit tests
on: [push]
jobs:
build-linux:
runs-on: ubuntu-latest
strategy:
max-parallel: 5
matrix:
python-version: ["3.7"]
steps:
- uses: actions/checkout@v4
- name: Set up Miniconda
uses: conda-incubator/setup-miniconda@v2
with:
python-version: ${{ matrix.python-version }}
activate-environment: lameg
auto-activate-base: false
- name: Install dependencies and build package
run: |
conda activate lameg
pip install -v .
lameg-postinstall
shell: bash -l {0}
- name: Lint with pylint
run: |
conda activate lameg
pip install -r dev_requirements.txt
pylint --rcfile=${{ github.workspace }}/.pylintrc $(git ls-files '*.py')
shell: bash -l {0}
- name: Test with pytest
env:
SUBJECTS_DIR: ${{ github.workspace }}/test_data/fs
MALLOC_TRIM_THRESHOLD_: 0
PYTHONUNBUFFERED: 1
run: |
set +e
conda activate lameg
wget -q -c https://osf.io/x4zd3/download -O "${{ github.workspace }}/test_data.tar.gz"
tar -xzf ${{ github.workspace }}/test_data.tar.gz -C ${{ github.workspace }}
rm ${{ github.workspace }}/test_data.tar.gz
stdbuf -oL -eL pytest -v -s --color=yes --cov=lameg --cov-report=xml
code=$?
# Fail only on nonzero codes other than segfault (139)
if [ $code -ne 0 ] && [ $code -ne 139 ]; then
exit $code
fi
shell: bash -l {0}
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage.xml