ENDF6 perturb worker test (to v1.1) (#347) #902
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# CI workflow for automated testing and documentation generation | |
name: CI | |
# Controls when the workflow will run | |
on: | |
# Triggers the workflow on push or pull request events for the develop and v1.1 branches | |
push: | |
branches: | |
- develop | |
- v1.1 | |
pull_request: | |
branches: | |
- develop | |
- v1.1 | |
# Allows manual triggering of the workflow from the Actions tab | |
workflow_dispatch: | |
# Environment variables accessible to all jobs | |
env: | |
NJOY: ${{ github.workspace }}/NJOY2016/build/njoy | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
# Define the jobs to be run | |
jobs: | |
build: | |
# Use the latest Ubuntu environment | |
runs-on: ubuntu-latest | |
steps: | |
# Check out the repository to the GitHub workspace | |
- uses: actions/checkout@v3 | |
# Set up the latest Python 3 version | |
- uses: actions/setup-python@v3 | |
with: | |
python-version: "3.x" | |
# Clone and build NJOY2016 | |
- name: Clone and build NJOY2016 | |
run: | | |
git clone https://github.com/njoy/NJOY2016.git | |
cd NJOY2016 | |
mkdir build | |
cd build | |
cmake -DPython3_EXECUTABLE=$(which python3) .. | |
make | |
# Remove NJOY2016 tests from the repository to avoid conflicts with SANDY tests | |
- name: Remove NJOY2016 tests | |
run: rm -rf NJOY2016/tests | |
# Install the sandy package | |
- name: Install sandy | |
run: pip install --no-cache-dir --user .[test,doc] | |
# Run tests with coverage reporting | |
- name: Run tests with pytest | |
run: pytest --cov=sandy sandy | |
# Build documentation | |
- name: Build documentation | |
run: bash make_docs.sh html |