fluka parsing geometry figures and zones #450
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 | |
on: | |
push: | |
branches: [master] | |
pull_request: | |
branches: [master] | |
workflow_dispatch: | |
jobs: | |
smoke-test-on-linux: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.11' | |
- name: Install dependencies | |
run: | | |
python3 -m pip install --upgrade pip | |
pip3 install -r requirements.txt | |
pip3 install -r test_requirements.txt | |
- name: Run main tests | |
run: python -m pytest | |
build-and-test: | |
runs-on: ${{ matrix.platform }} | |
needs: smoke-test-on-linux | |
strategy: | |
matrix: | |
python-version: ['3.11'] | |
platform: ['windows-latest', 'macos-latest'] | |
include: | |
- python-version: '3.9' | |
platform: 'ubuntu-latest' | |
- python-version: '3.10' | |
platform: 'ubuntu-latest' | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
python3 -m pip install --upgrade pip | |
pip3 install -r requirements.txt | |
pip3 install -r test_requirements.txt | |
- name: Run main tests | |
# when triggering tests with `python -m pytest` (instead of simply calling `pytest`) we add current directory to sys.path | |
run: python -m pytest | |
make-package: | |
runs-on: ubuntu-latest | |
needs: build-and-test | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.11' | |
- name: Install dependencies | |
run: | | |
python3 -m pip install --upgrade pip build | |
pip3 install -r requirements.txt | |
- name: Make package | |
run: python3 -m build | |
- name: Archive package as artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: packages | |
path: | | |
./dist | |
./tests/shieldhit/resources | |
test-package: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ['3.9', '3.10', '3.11'] | |
needs: make-package | |
steps: | |
- name: Fetch package as artifacts | |
uses: actions/download-artifact@v3 | |
with: | |
name: packages | |
- name: Inspect what has been downloaded | |
run: | | |
ls -al | |
find . | |
- name: Setup Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install package | |
run: python3 -m pip install dist/*whl | |
- name: Test package | |
run: | | |
yaptide-converter -h | |
yaptide-converter ./tests/shieldhit/resources/project.json | |
python3 -m converter.main -h | |
python3 -m converter.main ./tests/shieldhit/resources/project.json |