Skip to content

Commit 064f6db

Browse files
committed
workflows/pytest: disable full analysis tests
1 parent 508745f commit 064f6db

File tree

1 file changed

+91
-91
lines changed

1 file changed

+91
-91
lines changed

.github/workflows/pytest.yaml

+91-91
Original file line numberDiff line numberDiff line change
@@ -36,94 +36,94 @@ jobs:
3636
run: |
3737
pytest tests/test_coef.py tests/test_pytorch_core.py tests/test_scipy_stats.py tests/test_sklearn_metrics.py
3838
39-
pytest:
40-
name: Python tests for analyses
41-
runs-on: ${{ matrix.os }}
42-
strategy:
43-
max-parallel: 4
44-
fail-fast: false
45-
matrix:
46-
python-version: ["3.9"]
47-
os: [ubuntu-latest, macOS-latest, windows-latest]
48-
steps:
49-
- name: Checkout git repo
50-
uses: actions/checkout@v3
51-
- name: Cache conda
52-
id: cache
53-
uses: actions/cache@v3
54-
with:
55-
path: "${{ env.PY_ENV }}.tar.gz"
56-
key: ${{ runner.os }}-${{ env.PY_CACHE_NUMBER }}-${{ hashFiles('environment/environment.yml', 'environment/scripts/install_r_packages.r', 'environment/scripts/install_other_packages.sh') }}
57-
- name: Setup Miniconda
58-
if: steps.cache.outputs.cache-hit != 'true'
59-
uses: conda-incubator/setup-miniconda@v2
60-
with:
61-
activate-environment: ${{ env.PY_ENV }}
62-
environment-file: environment/environment.yml
63-
auto-activate-base: false
64-
miniforge-variant: Mambaforge
65-
miniforge-version: 'latest'
66-
use-mamba: true
67-
- name: Install other packages and Conda-Pack environment
68-
if: steps.cache.outputs.cache-hit != 'true'
69-
shell: bash -l {0}
70-
run: |
71-
# other packages (R packages mainly)
72-
bash environment/scripts/install_other_packages.sh
73-
74-
# install conda-pack, and pack environment
75-
conda install --yes -c conda-forge conda-pack coverage
76-
conda pack -f -n ${{ env.PY_ENV }} -o "${{ env.PY_ENV }}.tar.gz"
77-
- name: Unpack environment
78-
shell: bash -l {0}
79-
run: |
80-
mkdir -p "${{ env.PY_ENV }}"
81-
tar -xzf "${{ env.PY_ENV }}.tar.gz" -C "${{ env.PY_ENV }}"
82-
- name: Setup data and run pytest (Windows systems)
83-
if: runner.os == 'Windows'
84-
env:
85-
PYTHONPATH: libs/
86-
shell: cmd
87-
run: |
88-
echo on
89-
cd ${{ env.PY_ENV }}
90-
call .\Scripts\activate.bat
91-
.\Scripts\conda-unpack.exe
92-
cd ..
93-
set R_HOME=%CONDA_PREFIX%\Lib\R
94-
python environment\scripts\setup_data.py --mode testing
95-
pytest -v -rs tests
96-
- name: Setup data and run pytest (non-Windows systems)
97-
if: runner.os != 'Windows'
98-
shell: bash
99-
env:
100-
PYTHONPATH: libs/
101-
run: |
102-
source ${{ env.PY_ENV }}/bin/activate
103-
conda-unpack
104-
105-
python environment/scripts/setup_data.py --mode testing
106-
107-
if [ "$RUNNER_OS" == "Linux" ]; then
108-
# for linux/ubuntu, run the tests once: with numba jit activated
109-
# (which is the expected implementation) and with the jit
110-
# deactivated (otherwise coverage does not work).
111-
112-
# numba jit activated
113-
pytest -v -rs tests
114-
115-
# numba jit deactivated + code coverage
116-
export NUMBA_DISABLE_JIT=1
117-
coverage run --source=libs/ -m pytest -v -rs tests
118-
coverage xml -o coverage.xml
119-
else
120-
pytest -v -rs tests
121-
fi
122-
- name: Codecov upload
123-
if: runner.os == 'Linux'
124-
uses: codecov/codecov-action@v2
125-
with:
126-
files: ./coverage.xml
127-
name: codecov-${{ matrix.os }}-python${{ matrix.python-version }}
128-
fail_ci_if_error: true
129-
verbose: true
39+
# pytest:
40+
# name: Python tests for analyses
41+
# runs-on: ${{ matrix.os }}
42+
# strategy:
43+
# max-parallel: 4
44+
# fail-fast: false
45+
# matrix:
46+
# python-version: ["3.9"]
47+
# os: [ubuntu-latest, macOS-latest, windows-latest]
48+
# steps:
49+
# - name: Checkout git repo
50+
# uses: actions/checkout@v3
51+
# - name: Cache conda
52+
# id: cache
53+
# uses: actions/cache@v3
54+
# with:
55+
# path: "${{ env.PY_ENV }}.tar.gz"
56+
# key: ${{ runner.os }}-${{ env.PY_CACHE_NUMBER }}-${{ hashFiles('environment/environment.yml', 'environment/scripts/install_r_packages.r', 'environment/scripts/install_other_packages.sh') }}
57+
# - name: Setup Miniconda
58+
# if: steps.cache.outputs.cache-hit != 'true'
59+
# uses: conda-incubator/setup-miniconda@v2
60+
# with:
61+
# activate-environment: ${{ env.PY_ENV }}
62+
# environment-file: environment/environment.yml
63+
# auto-activate-base: false
64+
# miniforge-variant: Mambaforge
65+
# miniforge-version: 'latest'
66+
# use-mamba: true
67+
# - name: Install other packages and Conda-Pack environment
68+
# if: steps.cache.outputs.cache-hit != 'true'
69+
# shell: bash -l {0}
70+
# run: |
71+
# # other packages (R packages mainly)
72+
# bash environment/scripts/install_other_packages.sh
73+
#
74+
# # install conda-pack, and pack environment
75+
# conda install --yes -c conda-forge conda-pack coverage
76+
# conda pack -f -n ${{ env.PY_ENV }} -o "${{ env.PY_ENV }}.tar.gz"
77+
# - name: Unpack environment
78+
# shell: bash -l {0}
79+
# run: |
80+
# mkdir -p "${{ env.PY_ENV }}"
81+
# tar -xzf "${{ env.PY_ENV }}.tar.gz" -C "${{ env.PY_ENV }}"
82+
# - name: Setup data and run pytest (Windows systems)
83+
# if: runner.os == 'Windows'
84+
# env:
85+
# PYTHONPATH: libs/
86+
# shell: cmd
87+
# run: |
88+
# echo on
89+
# cd ${{ env.PY_ENV }}
90+
# call .\Scripts\activate.bat
91+
# .\Scripts\conda-unpack.exe
92+
# cd ..
93+
# set R_HOME=%CONDA_PREFIX%\Lib\R
94+
# python environment\scripts\setup_data.py --mode testing
95+
# pytest -v -rs tests
96+
# - name: Setup data and run pytest (non-Windows systems)
97+
# if: runner.os != 'Windows'
98+
# shell: bash
99+
# env:
100+
# PYTHONPATH: libs/
101+
# run: |
102+
# source ${{ env.PY_ENV }}/bin/activate
103+
# conda-unpack
104+
#
105+
# python environment/scripts/setup_data.py --mode testing
106+
#
107+
# if [ "$RUNNER_OS" == "Linux" ]; then
108+
# # for linux/ubuntu, run the tests once: with numba jit activated
109+
# # (which is the expected implementation) and with the jit
110+
# # deactivated (otherwise coverage does not work).
111+
#
112+
# # numba jit activated
113+
# pytest -v -rs tests
114+
#
115+
# # numba jit deactivated + code coverage
116+
# export NUMBA_DISABLE_JIT=1
117+
# coverage run --source=libs/ -m pytest -v -rs tests
118+
# coverage xml -o coverage.xml
119+
# else
120+
# pytest -v -rs tests
121+
# fi
122+
# - name: Codecov upload
123+
# if: runner.os == 'Linux'
124+
# uses: codecov/codecov-action@v2
125+
# with:
126+
# files: ./coverage.xml
127+
# name: codecov-${{ matrix.os }}-python${{ matrix.python-version }}
128+
# fail_ci_if_error: true
129+
# verbose: true

0 commit comments

Comments
 (0)