Skip to content

Commit

Permalink
CI: Switch to codecov orb
Browse files Browse the repository at this point in the history
  • Loading branch information
effigies committed Oct 12, 2023
1 parent 2c5eaa0 commit a806d42
Showing 1 changed file with 22 additions and 26 deletions.
48 changes: 22 additions & 26 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
version: 2
version: 2.1

orbs:
codecov: codecov/[email protected]

jobs:
tests:
docker:
Expand Down Expand Up @@ -26,7 +30,7 @@ jobs:
pip install -U pip
pip install -r /tmp/src/templateflow/requirements.txt
pip install datalad
pip install "setuptools>=45" "setuptools_scm >= 6.2" nipreps-versions build twine codecov
pip install "setuptools>=45" "setuptools_scm >= 6.2" nipreps-versions build twine
- run:
name: Install git and git-annex
Expand Down Expand Up @@ -58,12 +62,10 @@ jobs:
pytest --junit-xml=/tmp/tests/datalad.xml --cov templateflow --cov-report xml:/tmp/cov_api_dl.xml \
--doctest-modules /tmp/src/templateflow/templateflow
- run:
name: Submit api test coverage
command: |
source /tmp/venv/bin/activate
codecov --file /tmp/cov_api_dl.xml --root /tmp/src/templateflow \
--flags api,datalad -e CIRCLE_JOB
- codecov/upload:
file: /tmp/cov_api_dl.xml
flags: api,datalad
upload_name: Datalad tests

- run:
name: Run tests (pulling from S3)
Expand All @@ -74,12 +76,10 @@ jobs:
pytest --junit-xml=/tmp/tests/s3.xml --cov templateflow --cov-report xml:/tmp/cov_api_s3.xml \
--doctest-modules /tmp/src/templateflow/templateflow/api.py
- run:
name: Submit api test coverage
command: |
source /tmp/venv/bin/activate
codecov --file /tmp/cov_api_s3.xml --root /tmp/src/templateflow \
--flags api,s3 -e CIRCLE_JOB
- codecov/upload:
file: /tmp/cov_api_s3.xml
flags: api,s3
upload_name: S3 tests

- run:
name: Run tests (w/ DataLad, bypassed via S3)
Expand All @@ -91,12 +91,10 @@ jobs:
pytest --junit-xml=/tmp/tests/dl+s3.xml --cov templateflow --cov-report xml:/tmp/cov_api_dl_s3.xml \
--doctest-modules /tmp/src/templateflow/templateflow/api.py
- run:
name: Submit api test coverage
command: |
source /tmp/venv/bin/activate
codecov --file /tmp/cov_api_dl_s3.xml --root /tmp/src/templateflow \
--flags api,dls3 -e CIRCLE_JOB
- codecov/upload:
file: /tmp/cov_api_dl_s3.xml
flags: api,dls3
upload_name: Datalad-S3-bypass

- run:
name: Run tests (config, parameterized TEMPLATEFLOW_USE_DATALAD)
Expand All @@ -105,12 +103,10 @@ jobs:
pytest --junit-xml=/tmp/tests/conftests.xml --cov templateflow --cov-report xml:/tmp/cov_config.xml \
/tmp/src/templateflow/templateflow/conf/tests/test_conf.py
- run:
name: Submit config test coverage
command: |
source /tmp/venv/bin/activate
codecov --file /tmp/cov_config.xml --root /tmp/src/templateflow \
--flags config -e CIRCLE_JOB
- codecov/upload:
file: /tmp/cov_config.xml
flags: config
upload_name: Config

- store_test_results:
path: /tmp/tests
Expand Down

0 comments on commit a806d42

Please sign in to comment.