Merge pull request #57 from SteSeg/build_model #162
This file contains hidden or 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
| name: Run Tests | |
| on: [push, pull_request] | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Apt dependencies | |
| shell: bash | |
| run: | | |
| sudo apt -y update | |
| sudo apt install -y libglu1-mesa \ | |
| libglu1-mesa-dev | |
| - name: Checkout repository | |
| uses: actions/checkout@v3 | |
| - name: Set up Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: "3.12" # Change to your required version | |
| - name: Set up Conda | |
| uses: conda-incubator/setup-miniconda@v2 | |
| with: | |
| activate-environment: test-env | |
| miniforge-version: latest | |
| # use-mamba: true | |
| channels: conda-forge | |
| - name: Create Conda environment | |
| shell: bash -l {0} | |
| run: | | |
| conda install -c conda-forge openmc>=0.14.0 | |
| - name: Install dependencies | |
| shell: bash -l {0} | |
| run: | | |
| pip install coveralls | |
| python -m pip install .[tests] | |
| - name: Run tests | |
| shell: bash -l {0} | |
| run: | | |
| python -m pytest test/ --cov openmc_fusion_benchmarks --cov-report xml --cov-report term | |
| - name: Upload coverage to Coveralls | |
| shell: bash -l {0} | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: coveralls |