File: test-with-conda.yml

package info (click to toggle)
python-pyepics 3.5.9%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,308 kB
  • sloc: python: 10,303; makefile: 109; javascript: 104; sh: 54
file content (74 lines) | stat: -rw-r--r-- 3,301 bytes parent folder | download
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
62
63
64
65
66
67
68
69
70
71
72
73
74
name: Test with Conda, Py3.10 to 3.14

on: [push]

jobs:
  build:
    runs-on: ubuntu-latest
    strategy:
      max-parallel: 5
      fail-fast: false
      matrix:
        python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
    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