| name: Test with Conda, Py3.8 | |
| on: [push] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| max-parallel: 5 | |
| fail-fast: false | |
| matrix: | |
| python-version: ["3.8"] | |
| defaults: | |
| run: | |
| shell: bash -l {0} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up miniconda Python ${{ matrix.python-version }} | |
| uses: conda-incubator/setup-miniconda@v2.2.0 | |
| with: | |
| miniconda-version: latest | |
| channels: conda-forge,defaults | |
| channel-priority: true | |
| activate-environment: anaconda-client-env | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install conda packages for dependencies | |
| run: | | |
| conda install -y -c conda-forge python=${{ matrix.python-version }} numpy pip setuptools | |
| conda install -y -c conda-forge epics-base gcc_linux-64 tar autoconf wget | |
| printenv | |
| which python | |
| python -VV | |
| - name: download and install procServ | |
| run: | | |
| wget https://millenia.cars.aps.anl.gov/software/xspress3/sources/procServ-2.8.0.tar.gz | |
| tar xf procServ-2.8.0.tar.gz | |
| cd procServ-2.8.0 && sh ./configure && make -j2 | |
| cp procServ $CONDA_PREFIX/epics/bin/linux-x86_64/. | |
| - name: Install pyepics | |
| run: | | |
| python -m pip install setuptools pyparsing pytest pytest-cov coverage codecov | |
| python -m pip install --upgrade pip | |
| python -m pip install ".[all]" | |
| - name: Run test suite | |
| run: | | |
| cd tests/Setup | |
| export EPICS_CA_ADDR_LIST=localhost | |
| export EPICS_CA_AUTO_ADDR_LIST=NO | |
| export EPICS_CA_MAX_ARRAY_BYTES=20100300 | |
| export EPICS_HOST_ARCH=linux-x86_64 | |
| export PATH=$CONDA_PREFIX/epics/bin/$EPICS_HOST_ARCH:$PATH | |
| bash start_ioc.sh | |
| sleep 2 | |
| python simulator.py & | |
| sleep 2 | |
| cd .. | |
| coverage erase | |
| coverage run --source=epics --append --timid -m pytest test_camonitor_func.py | |
| coverage run --source=epics --append --timid -m pytest test_ca_typeconversion.py | |
| coverage run --source=epics --append --timid -m pytest test_pv_callback.py | |
| coverage run --source=epics --append --timid -m pytest test_pv_initcallbacks.py | |
| coverage run --source=epics --append --timid -m pytest test_pvsubarray.py | |
| coverage run --source=epics --append --timid -m pytest test_cathread.py | |
| coverage run --source=epics --append --timid -m pytest test_multiprocessing.py | |
| coverage run --source=epics --append --timid -m pytest test_threading.py | |
| coverage run --source=epics --append --timid -m pytest test_aodevice.py | |
| coverage run --source=epics --append --timid -m pytest test_ca_unittests.py | |
| coverage run --source=epics --append --timid -m pytest test_ca_subscribe.py | |
| coverage run --source=epics --append --timid -m pytest test_pv_unittests.py | |
| coverage run --source=epics --append --timid -m pytest test_pv_typeconversion.py | |
| coverage run --source=epics --append --timid -m pytest test_pv_disconnect.py | |
| coverage report -m --omit "wxlib*,wxutils*,ogl*,motor*,mca*,ad*,struck*,transform*,scan*,scal*,xspress*" | |
| - name: upload coverage report to codecov | |
| uses: codecov/codecov-action@v2 | |