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

CircleCI pipeline optimisations #138

Merged
merged 21 commits into from
Dec 1, 2021
Merged
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
24ec41c
Merge pull request #15 from fusion-energy/develop
shimwell Jul 6, 2021
0fea938
Merge pull request #21 from fusion-energy/develop
shimwell Jul 12, 2021
cfbfe48
Merge pull request #24 from fusion-energy/develop
shimwell Jul 15, 2021
ee81f3f
Merge pull request #38 from fusion-energy/develop
shimwell Jul 20, 2021
c280114
Merge pull request #61 from fusion-energy/develop
shimwell Aug 4, 2021
62d6794
Merge pull request #66 from fusion-energy/develop
shimwell Aug 24, 2021
0acc0b0
Merge pull request #68 from fusion-energy/develop
shimwell Aug 25, 2021
3605942
Merge pull request #70 from fusion-energy/develop
shimwell Aug 25, 2021
8b8b6e9
Merge pull request #73 from fusion-energy/develop
shimwell Aug 25, 2021
7f00ad7
Merge pull request #77 from fusion-energy/develop
shimwell Aug 26, 2021
d92e52b
Merge pull request #78 from fusion-energy/develop
shimwell Aug 26, 2021
3af276d
Merge pull request #92 from fusion-energy/develop
shimwell Sep 16, 2021
7c44d7c
Merge pull request #99 from fusion-energy/develop
shimwell Sep 23, 2021
91be39e
Merge pull request #105 from fusion-energy/develop
shimwell Sep 27, 2021
5348fbd
Merge pull request #108 from fusion-energy/develop
shimwell Sep 28, 2021
b91213b
Merge pull request #112 from fusion-energy/develop
shimwell Sep 30, 2021
15a0734
Merge pull request #119 from fusion-energy/develop
shimwell Oct 11, 2021
bee4f04
Merge pull request #124 from fusion-energy/develop
shimwell Oct 19, 2021
9c19f30
split out quick tests
Dec 1, 2021
d16ab46
tweak resource class slightly
Dec 1, 2021
ecf9a46
reapply formatting
Dec 1, 2021
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
103 changes: 65 additions & 38 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,69 +2,96 @@
##
# Check https://circleci.com/docs/2.0/language-python/ for more details

version: 2
jobs:
# test:
build:
version: 2.1

executors:
paramak:
docker:
- image: ghcr.io/fusion-energy/paramak:dependencies
resource_class: large

commands:
install:
steps:
- checkout
- run:
name: install
name: Install
command: |
python setup.py install
codecov-upload:
steps:
- run:
name: Codecov upload
command: bash <(curl -s https://codecov.io/bash)

jobs:
# Tests: Utils, Shape, Reactor, Parametric Shapes
quick-tests:
executor: paramak
resource_class: medium
steps:
- checkout
- install
- run:
name: run utils tests
command:
pytest tests/test_utils.py -v --cov=paramak --cov-append --cov-report term --cov-report xml --junitxml=test-reports/junit.xml

command: pytest tests/test_utils.py -v --cov=paramak --cov-append --cov-report term --cov-report xml --junitxml=test-reports/junit.xml
- run:
name: run shape tests
command:
pytest tests/test_shape.py -v --cov=paramak --cov-append --cov-report term --cov-report xml --junitxml=test-reports/junit.xml

command: pytest tests/test_shape.py -v --cov=paramak --cov-append --cov-report term --cov-report xml --junitxml=test-reports/junit.xml
- run:
name: run Reactor tests
command:
pytest tests/test_reactor.py -v --cov=paramak --cov-append --cov-report term --cov-report xml --junitxml=test-reports/junit.xml

command: pytest tests/test_reactor.py -v --cov=paramak --cov-append --cov-report term --cov-report xml --junitxml=test-reports/junit.xml
- run:
name: run parametric_shapes tests
command:
pytest tests/test_parametric_shapes/ -v --cov=paramak --cov-append --cov-report term --cov-report xml --junitxml=test-reports/junit.xml
command: pytest tests/test_parametric_shapes/ -v --cov=paramak --cov-append --cov-report term --cov-report xml --junitxml=test-reports/junit.xml
- store_test_results:
path: test-reports
- store_artifacts:
path: test-reports
- codecov-upload

# Tests: Parametric components
parametric-components-tests:
executor: paramak
resource_class: medium
parallelism: 2
steps:
- checkout
- install
- run:
name: run parametric_components tests
command:
pytest tests/test_parametric_components/ -v --cov=paramak --cov-append --cov-report term --cov-report xml --junitxml=test-reports/junit.xml
command: |
set -e
TEST_FILES=$(circleci tests glob "tests/test_parametric_components/**/*.py" | circleci tests split)
pytest -v --cov=paramak --cov-append --cov-report term --cov-report xml --junitxml=test-reports/junit.xml $TEST_FILES
- store_test_results:
path: test-reports
- store_artifacts:
path: test-reports
- codecov-upload

# Tests: Parametric reactors
parametric-reactors-tests:
executor: paramak
parallelism: 6
steps:
- checkout
- install
- run:
name: run parametric_reactors tests
command:
pytest tests/test_parametric_reactors/ -v --cov=paramak --cov-append --cov-report term --cov-report xml --junitxml=test-reports/junit.xml

command: |
set -e
TEST_FILES=$(circleci tests glob "tests/test_parametric_reactors/**/*.py" | circleci tests split)
pytest -v --cov=paramak --cov-append --cov-report term --cov-report xml --junitxml=test-reports/junit.xml $TEST_FILES
- store_test_results:
path: test-reports

- run: bash <(curl -s https://codecov.io/bash)
- store_artifacts:
path: test-reports
- codecov-upload

workflows:
version: 2
test-build-deploy:
jobs:
- build
# - test
# - build-deploy-master:
# requires:
# - test
# filters:
# branches:
# only: master
# - build-deploy-dev:
# requires:
# - test
# filters:
# branches:
# only: develop
- quick-tests
- parametric-components-tests
- parametric-reactors-tests