-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (49 loc) · 1.8 KB
/
python-package-conda.yml
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
61
name: Python Package using Conda
on: [push, pull_request]
jobs:
build-linux:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Set up Conda Environment
uses: conda-incubator/setup-miniconda@v2
with:
activate-environment: hwm-1.0.0 # Updated environment name for HWM
environment-file: environment.yml
python-version: '3.10' # Ensure compatibility with HWM requirements
auto-activate-base: false
- name: Set PYTHONPATH
run: |
echo "Setting PYTHONPATH"
echo "PYTHONPATH=$PYTHONPATH:$(pwd)/hwm" >> $GITHUB_ENV # Updated path for HWM
- name: Install Dependencies
run: |
python -m pip install --user "numpy<2" cython # Install specific dependencies
- name: Compile Cython Modules
run: |
find . -name "*.pyx" -exec cythonize -i {} \; # Compile all Cython .pyx files
- name: Install HWM Package
run: |
python -m pip install . # Install the HWM package
- name: Configure Conda
run: |
echo "Configuring conda..."
conda config --set channel_priority strict
conda config --set solver classic
- name: Lint with flake8
run: |
python -m pip install flake8
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest
run: |
python -m pip install pytest pytest-xdist
pytest -n auto # Utilize all available CPU cores for testing
- name: Debugging Information
if: failure() # Executes only if previous steps fail
run: |
echo "Printing debug information..."
echo "PATH=$PATH"
conda info
conda list