mirror of
https://github.com/slsdetectorgroup/aare.git
synced 2026-01-22 18:28:53 +01:00
- automatically run python tests - automatically run test using data files on local runner from gitea - fixed some of the workflows --------- Co-authored-by: Erik Fröjdh <erik.frojdh@psi.ch>
48 lines
1.3 KiB
YAML
48 lines
1.3 KiB
YAML
name: Run tests using data on local RHEL8
|
|
|
|
on:
|
|
push: # pull_request only works if pull_request in gitea
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: "detectors-software-RH8"
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Clone aare-test-data repository
|
|
run: |
|
|
git lfs install
|
|
git clone https://gitea.psi.ch/detectors/aare-test-data.git ../aare-test-data
|
|
cd ../aare-test-data
|
|
git lfs pull
|
|
|
|
- name: Build library
|
|
run: |
|
|
source /home/gitea_runner/.bashrc
|
|
conda activate aare_test
|
|
mkdir build && cd build
|
|
cmake .. -DAARE_PYTHON_BINDINGS=ON -DAARE_TESTS=ON
|
|
make -j 4
|
|
|
|
- name: C++ unit tests
|
|
working-directory: ${{github.workspace}}/build
|
|
env:
|
|
AARE_TEST_DATA: ${{github.workspace}}/../aare-test-data
|
|
run: ./run_tests [.with-data] # TODO: should we run all tests?
|
|
|
|
- name: Python unit tests
|
|
working-directory: ${{github.workspace}}/build
|
|
env:
|
|
AARE_TEST_DATA: ${{github.workspace}}/../aare-test-data
|
|
run: |
|
|
source /home/gitea_runner/.bashrc
|
|
conda activate aare_test
|
|
python -m pytest ${{github.workspace}}/python/tests/ --with-data # runs all tests
|
|
|
|
|
|
|