Skip to content

paper version number #36

paper version number

paper version number #36

Workflow file for this run

name: Python application
on:
push:
branches: [ main, develop, 'release*' ]
paths:
- 'src/**'
- 'tests/**'
pull_request:
branches: [ main ]
workflow_dispatch:
permissions:
contents: read
env:
PYTHONPATH: '/usr/local/lib'
jobs:
build:
timeout-minutes: 20
env:
PYTHONPATH: "/usr/local/lib/python${{matrix.pyv}}/site-packages"
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
pyv: ["3.9", "3.10", "3.11"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{matrix.pyv}}
uses: actions/setup-python@v5
with:
python-version: ${{matrix.pyv}}
- name: basic dependencies
run: |
sudo apt-get update
echo 'debconf debconf/frontend select Noninteractive' | sudo debconf-set-selections
sudo apt-get -y install libhdf5-103 xserver-xorg-core xserver-xorg-dev libx11-6 libgl1 libxcursor1 libglu1-mesa libxinerama1 libxft2
- name: setup a micromamba environment to get at openmc etc.
uses: mamba-org/setup-micromamba@v1
with:
environment-name: cad_to_openmc_Testing
create-args: >-
python=${{matrix.pyv}}
openmc=0.14.0=dagmc_mpi_openmpi*
ocp=7.7.2.1
cadquery=2.4.0
init-shell: bash
- name: Test OpenMC
run: openmc --version
shell: micromamba-shell {0}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8 build pytest
grep -v cadq requirements.txt > reqs_cleaned.txt
pip install -r reqs_cleaned.txt
micromamba list
python -c "import gmsh"
shell: micromamba-shell {0}
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics --exclude=moab
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics --exclude=moab
shell: micromamba-shell {0}
- name: Build, pip-install, and test-import CAD_to_OpenMC with dependencies.
run: |
python -m build --sdist .
pip install --no-deps dist/cad_to_openmc*.tar.gz
python -c 'import CAD_to_OpenMC.assembly'
shell: micromamba-shell {0}
- name: Run Tests
run: |
pytest -v --debug=debuglog.log tests
shell: micromamba-shell {0}