Skip to content

tests: explicit context create/destroy #30

tests: explicit context create/destroy

tests: explicit context create/destroy #30

Workflow file for this run

name: Python package
on: [push]
defaults:
run:
shell: bash -l {0}
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: ["ubuntu-latest", "windows-latest", "macos-latest"]
python: ["3.6", "3.12"]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Conda
uses: conda-incubator/setup-miniconda@v3
with:
python-version: ${{ matrix.python }}
auto-activate-base: false
environment-file: .github/workflows/conda-test-environment.yml
- name: Install pip packages
run: |
pip install -e .
pip install git+https://github.com/CaChannel/CaChannel.git
- name: Dump EPICS base env
if: runner.os == 'Windows'
shell: cmd /C CALL {0}
run: |
echo EPICS_BASE=%EPICS_BASE%>> "%GITHUB_ENV%"
echo EPICS_HOST_ARCH=%EPICS_HOST_ARCH%>> "%GITHUB_ENV%"
tree /F "%EPICS_BASE%/bin/%EPICS_HOST_ARCH%"
- name: Start EPICS IOC
run: |
"$EPICS_BASE/bin/$EPICS_HOST_ARCH/caRepeater" &
"$EPICS_BASE/bin/$EPICS_HOST_ARCH/softIoc" -D "$EPICS_BASE/dbd/softIoc.dbd" -S -d tests/test.db &
- name: Run tests
run: |
py.test tests/test_context.py
py.test tests/test_preemptive.py
py.test tests/test_thread.py
py.test tests/test_callbacks.py
py.test tests/test_put_types.py
py.test tests/test_get_dbrtypes.py
py.test tests/test_sg.py
python -m CaChannel.CaChannel
env:
CACHANNEL_BACKEND: caffi
- name: Stop EPICS IOC
run: |
if [[ $RUNNER_OS == "Windows" ]]; then
taskkill /F /IM softIoc.exe
taskkill /F /IM caRepeater.exe
else
killall softIoc
killall caRepeater
fi