File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1717 uses : actions/cache@v4
1818 with :
1919 path : ~/conda_pkgs_dir
20- key : ${{ runner.os }}-conda-pkgs-
20+ key : ${{ runner.os }}-conda-pkgs-${{ hashFiles('environment.yml') }}
2121 restore-keys : |
2222 ${{ runner.os }}-conda-pkgs-
2323
@@ -30,17 +30,16 @@ jobs:
3030 use-mamba : true
3131 auto-activate-base : false
3232
33- - name : Install additional pip dependencies (CPU-safe version of torch)
33+ - name : Clear Python caches
3434 run : |
35- conda run -n hotel_management pip install torch==2.10.0
36- conda run -n hotel_management pip install -r requirements.txt
37- conda run -n hotel_management pip install coverage
35+ find . -type d -name "__pycache__" -exec rm -rf {} +
36+ find . -name "*.pyc" -delete
3837
39- - name : Show environment
40- run : conda run -n hotel_management conda list
38+ - name : Set PYTHONPATH
39+ run : echo "PYTHONPATH=${{ github.workspace }}" >> $GITHUB_ENV
4140
42- - name : Run tests with coverage
43- run : conda run -n hotel_management coverage run -m pytest -v --maxfail=1 --disable-warnings
41+ - name : Install package in editable mode
42+ run : conda run -n hotel_management pip install -e .
4443
45- - name : Show coverage summary and enforce minimum
46- run : conda run -n hotel_management coverage report -m -i --fail-under=90
44+ - name : Run tests with coverage
45+ run : conda run -n hotel_management coverage run -m pytest -v --maxfail=1 --disable-warnings
You can’t perform that action at this time.
0 commit comments