Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add selective testing #764

Merged
merged 21 commits into from
Mar 9, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 0 additions & 17 deletions .github/workflows/docker_ci.yml

This file was deleted.

21 changes: 21 additions & 0 deletions .github/workflows/docker_ci_develop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@

name: CI
on:
pull_request:
branches:
- develop
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
cadquery-version: [2.1]
include-neutronics: [true]

steps:
- uses: actions/checkout@v1
- name: Build and test with Docker
run: |
docker build -t paramak --build-arg include_neutronics=${{ matrix.include-neutronics }} --build-arg cq_version=${{ matrix.cadquery-version}} --build-arg compile_cores=2 .
docker run --rm paramak /bin/bash -c "bash run_tests.sh include_neutronics=${{ matrix.include-neutronics }} && curl -s https://codecov.io/bash | bash"
21 changes: 21 additions & 0 deletions .github/workflows/docker_ci_main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@

name: CI
on:
pull_request:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
cadquery-version: [2.1, master]
include-neutronics: [true]

steps:
- uses: actions/checkout@v1
- name: Build and test with Docker
run: |
docker build -t paramak --build-arg include_neutronics=${{ matrix.include-neutronics }} --build-arg cq_version=${{ matrix.cadquery-version}} --build-arg compile_cores=2 .
docker run --rm paramak /bin/bash -c "bash run_tests.sh include_neutronics=${{ matrix.include-neutronics }} && curl -s https://codecov.io/bash | bash"
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,6 @@ common reactor components.

<p align="center">
<img src="https://user-images.githubusercontent.com/8583900/99137324-fddfa200-2621-11eb-9063-f5f7f60ddd8d.png" width="713">

</p>

<p align="center">
Expand Down
9 changes: 6 additions & 3 deletions run_tests.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
#!/bin/bash

pytest tests/test_neutronics_utils.py -v --cov=paramak --cov-append --cov-report term --cov-report xml
pytest tests/test_example_neutronics_simulations.py -v --cov=paramak --cov-append --cov-report term --cov-report xml
pytest tests/test_utils.py -v --cov=paramak --cov-append --cov-report term --cov-report xml
pytest tests/test_Shape.py -v --cov=paramak --cov-append --cov-report term --cov-report xml
pytest tests/test_Reactor.py -v --cov=paramak --cov-append --cov-report term --cov-report xml
Expand All @@ -11,4 +9,9 @@ pytest tests/test_parametric_reactors/ -v --cov=paramak --cov-append --cov-repor
pytest tests/test_example_shapes.py -v --cov=paramak --cov-append --cov-report term --cov-report xml
pytest tests/test_example_components.py -v --cov=paramak --cov-append --cov-report term --cov-report xml
pytest tests/test_example_reactors.py -v --cov=paramak --cov-append --cov-report term --cov-report xml
pytest tests/test_parametric_neutronics/ -v --cov=paramak --cov-append --cov-report term --cov-report xml

if [[ "$1" = "include-neutronics=true" ]]; then
pytest tests/test_neutronics_utils.py -v --cov=paramak --cov-append --cov-report term --cov-report xml
pytest tests/test_example_neutronics_simulations.py -v --cov=paramak --cov-append --cov-report term --cov-report xml
pytest tests/test_parametric_neutronics/ -v --cov=paramak --cov-append --cov-report term --cov-report xml
fi