Fixed bug double adding materials. #599
Workflow file for this run
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
name: CI testing | |
on: | |
pull_request: | |
push: | |
branches: [develop, main, alpha-test] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
fetch-tags: true | |
- name: set up python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- run: pip install --upgrade pip | |
- run: pip install .[build] | |
- name: Get Version | |
id: get_version | |
run: python -m setuptools_scm | |
- run: python -m build --sdist --wheel | |
- run: pip install . | |
- run: pip uninstall -y montepy | |
- run: pip install --user dist/*.whl | |
# run scripts | |
- run: change_to_ascii -h | |
- run: pip uninstall -y montepy | |
- run: pip install --user dist/*.tar.gz | |
- run: pip install --user . montepy[test] | |
- run: pip install --user . montepy[doc] | |
if: ${{ matrix.python-version != '3.8'}} | |
- run: pip install --user . montepy[format] | |
- run: pip install --user . montepy[build] | |
- run: pip install --user . montepy[develop] | |
if: ${{ matrix.python-version != '3.8'}} | |
- run: pip freeze | |
- name: Upload build artifacts | |
uses: actions/upload-artifact@v4.3.1 | |
if: ${{ matrix.python-version == '3.9' }} | |
with: | |
name: build | |
path: dist/* | |
test: | |
runs-on: ubuntu-latest | |
permissions: write-all | |
strategy: | |
matrix: | |
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: set up python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- run: pip install --user . montepy[test] | |
- run: pip install --user . montepy[build] | |
- run: coverage run -m pytest --junitxml=test_report.xml | |
- run: coverage report | |
if: ${{ success() || failure() }} | |
- run: coverage xml | |
if: ${{ success() || failure() }} | |
- name: Upload test report | |
if: ${{ matrix.python-version == '3.9' && (success() || failure() )}} | |
uses: actions/upload-artifact@v4 | |
with: | |
name: test | |
path: test_report.xml | |
- name: Upload coverage report | |
if: ${{ matrix.python-version == '3.9' && (success() || failure() )}} | |
uses: actions/upload-artifact@v4 | |
with: | |
name: coverage | |
path: coverage.xml | |
- name: Coveralls GitHub Action | |
if: ${{ matrix.python-version == '3.9' && (success() || failure() )}} | |
uses: coverallsapp/github-action@v2 | |
with: | |
file: coverage.xml | |
doc-test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
fetch-tags: true | |
- name: set up python 3.12 | |
uses: actions/setup-python@v5 | |
with: | |
python-version: 3.12 | |
- run: pip install . montepy[doc,build] | |
- run: sphinx-build doc/source/ doc/build/html -W --keep-going -E | |
name: Build site strictly | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: website | |
path: doc/build | |
- name: Test for missing API documentation | |
run: | | |
cd doc/source | |
python _test_for_missing_docs.py | |
- name: Test for broken hyperlinks | |
run: | | |
cd doc | |
make linkcheck | |
- name: test sitemap | |
run: python .github/scripts/check_sitemap.py | |
format-test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: set up python 3.12 | |
uses: actions/setup-python@v5 | |
with: | |
python-version: 3.12 | |
- run: pip install . montepy[format] | |
- run: black --check montepy/ tests/ | |
profile: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: set up python 3.12 | |
uses: actions/setup-python@v5 | |
with: | |
python-version: 3.12 | |
- run: pip install . montepy[test] | |
- run: pytest --profile | |
name: Profile test suite | |
- run: python prof/dump_results.py | |
name: Display pytest profiling data | |
- run: python prof/profile_big_model.py | |
name: Profile against big model | |
benchmark: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: set up python 3.12 | |
uses: actions/setup-python@v5 | |
with: | |
python-version: 3.12 | |
- run: pip install . montepy[test] | |
- run: python benchmark/benchmark_big_model.py | |
name: Benchmark against big model | |
changelog-test: | |
runs-on: ubuntu-latest | |
if: github.ref != 'refs/heads/main' | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Check for changes | |
uses: dorny/paths-filter@v3 | |
id: changes | |
with: | |
filters: | | |
changelog: | |
- 'doc/source/changelog.rst' | |
code: | |
- 'montepy/**' | |
- if: (steps.changes.outputs.changelog == 'false') && steps.changes.outputs.code == 'true' | |
run: | | |
echo "Changelog not updated" | |
exit 1 |