Skip to content

GHA: use renamed conda env file #38

GHA: use renamed conda env file

GHA: use renamed conda env file #38

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.txt
- 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}
# Note: No space before ">>", otherwise the space will be part of the value
run: |
echo EPICS_BASE=%EPICS_BASE%>> "%GITHUB_ENV%"
echo EPICS_HOST_ARCH=%EPICS_HOST_ARCH%>> "%GITHUB_ENV%"
- 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 -IM softIoc.exe -F
taskkill -IM caRepeater.exe -F
else
killall softIoc
killall caRepeater
fi