-
Notifications
You must be signed in to change notification settings - Fork 1
52 lines (44 loc) · 1.69 KB
/
Copy pathpython-app.yml
File metadata and controls
52 lines (44 loc) · 1.69 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
name: Python application with conda
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
schedule:
# min hours day(month) month day(week)
- cron: "0 0 1 */3 *" # quarterly
jobs:
build:
runs-on: ubuntu-latest
container:
image: continuumio/miniconda3 # Lightweight image with Miniconda
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Cache Conda packages
uses: actions/cache@v4
id: conda-cache
with:
path: /home/runner/conda_pkgs_dir
key: conda-${{ runner.os }}-${{ hashFiles('environment.yml') }}
- name: Install Mamba for faster Conda operations # fix for: [Errno 28] No space left on device
run: |
conda install -n base -c conda-forge mamba -y
- name: Set up Conda environment using Mamba
run: |
mkdir -p /home/runner/conda_pkgs_dir # Create a persistent cache location
echo "CONDA_PKGS_DIRS=/home/runner/conda_pkgs_dir" >> $GITHUB_ENV
mamba create -n selectzyme --file environment.yml -y
source activate selectzyme
python --version
pip list
- name: Install additional test dependencies
run: |
conda activate selectzyme
conda install -y pytest pytest-cov
pip list
- name: Run tests with pytest
shell: bash -l {0} # Ensures the Conda environment is correctly sourced
run: |
conda activate selectzyme
python -m pytest --cov=selectzyme/ -v tests/test_* -k 'not select and not gen_embedding and not TestML and not cuml and not cuda and not TestQdrantDB' # exclude tests requiring GPU/cuda