Skip to content

test

test #21

Workflow file for this run

name: test
on:
push:
pull_request:
schedule:
- cron: '13 15 * * 0' # 13:15 every Sunday
jobs:
build_and_test_plugin:
strategy:
matrix:
os: [ ubuntu-latest, macos-latest, windows-latest ]
name: ${{ matrix.os }}
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
path: src
- name: Install dependencies
run: pip install 'ncrystal-core>=3.9.87' "scikit-build-core>=0.10" "ncrystal-pypluginmgr>=0.0.5" "ncrystal-python>=3.9.87"
- name: Install plugin
run: pip install ./src
- name: Verify plugin loading
run: ncrystal-pluginmanager --test nxslib
- name: Use nxs file
run: nctool -d 'plugins::nxslib/Au_sg225.nxs'
- name: Load all nxs files
shell: python
run: |
from NCrystal.datasrc import browseFiles
from NCrystal.core import createScatter
nfiles = 0
for f in browseFiles(factory='plugins'):
if f.name.startswith('nxslib/'):
nfiles += 1
print(f'Loading {f.fullKey}')
createScatter(f.fullKey)
if nfiles < 35:
raise SystemExit('Too few nxs files provided')