Files
aare/.gitea/workflows/rh8-data-tests-local.yml
AliceMazzoleni99 b77a576f72
All checks were successful
Build on RHEL8 / build (push) Successful in 2m13s
Build on RHEL9 / build (push) Successful in 2m37s
Run tests using data on local RHEL8 / build (push) Successful in 3m12s
Dev/automate tests using data (#267)
- 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>
2026-01-20 17:20:48 +01:00

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