Run examples separately from tests.
This optimizes the total run time of the Circle CI test suite.
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
version: 2
|
version: 2
|
||||||
jobs:
|
jobs:
|
||||||
build_py3_torch_and_tf:
|
run_tests_py3_torch_and_tf:
|
||||||
working_directory: ~/transformers
|
working_directory: ~/transformers
|
||||||
docker:
|
docker:
|
||||||
- image: circleci/python:3.5
|
- image: circleci/python:3.5
|
||||||
@@ -17,7 +17,7 @@ jobs:
|
|||||||
- run: sudo pip install tensorboardX scikit-learn
|
- run: sudo pip install tensorboardX scikit-learn
|
||||||
- run: python -m pytest -n 8 --dist=loadfile -s -v ./transformers/tests/ --cov
|
- run: python -m pytest -n 8 --dist=loadfile -s -v ./transformers/tests/ --cov
|
||||||
- run: codecov
|
- run: codecov
|
||||||
build_py3_torch:
|
run_tests_py3_torch:
|
||||||
working_directory: ~/transformers
|
working_directory: ~/transformers
|
||||||
docker:
|
docker:
|
||||||
- image: circleci/python:3.5
|
- image: circleci/python:3.5
|
||||||
@@ -32,9 +32,8 @@ jobs:
|
|||||||
- run: sudo pip install pytest codecov pytest-cov pytest-xdist
|
- run: sudo pip install pytest codecov pytest-cov pytest-xdist
|
||||||
- run: sudo pip install tensorboardX scikit-learn
|
- run: sudo pip install tensorboardX scikit-learn
|
||||||
- run: python -m pytest -n 8 --dist=loadfile -s -v ./transformers/tests/ --cov
|
- run: python -m pytest -n 8 --dist=loadfile -s -v ./transformers/tests/ --cov
|
||||||
- run: python -m pytest -n 8 --dist=loadfile -s -v ./examples/
|
|
||||||
- run: codecov
|
- run: codecov
|
||||||
build_py3_tf:
|
run_tests_py3_tf:
|
||||||
working_directory: ~/transformers
|
working_directory: ~/transformers
|
||||||
docker:
|
docker:
|
||||||
- image: circleci/python:3.5
|
- image: circleci/python:3.5
|
||||||
@@ -50,7 +49,7 @@ jobs:
|
|||||||
- run: sudo pip install tensorboardX scikit-learn
|
- run: sudo pip install tensorboardX scikit-learn
|
||||||
- run: python -m pytest -n 8 --dist=loadfile -s -v ./transformers/tests/ --cov
|
- run: python -m pytest -n 8 --dist=loadfile -s -v ./transformers/tests/ --cov
|
||||||
- run: codecov
|
- run: codecov
|
||||||
build_py3_custom_tokenizers:
|
run_tests_py3_custom_tokenizers:
|
||||||
working_directory: ~/transformers
|
working_directory: ~/transformers
|
||||||
docker:
|
docker:
|
||||||
- image: circleci/python:3.5
|
- image: circleci/python:3.5
|
||||||
@@ -60,6 +59,21 @@ jobs:
|
|||||||
- run: sudo pip install pytest pytest-xdist
|
- run: sudo pip install pytest pytest-xdist
|
||||||
- run: sudo pip install mecab-python3
|
- run: sudo pip install mecab-python3
|
||||||
- run: RUN_CUSTOM_TOKENIZERS=1 python -m pytest -sv ./transformers/tests/tokenization_bert_japanese_test.py
|
- run: RUN_CUSTOM_TOKENIZERS=1 python -m pytest -sv ./transformers/tests/tokenization_bert_japanese_test.py
|
||||||
|
run_examples_py3_torch:
|
||||||
|
working_directory: ~/transformers
|
||||||
|
docker:
|
||||||
|
- image: circleci/python:3.5
|
||||||
|
environment:
|
||||||
|
OMP_NUM_THREADS: 1
|
||||||
|
resource_class: xlarge
|
||||||
|
parallelism: 1
|
||||||
|
steps:
|
||||||
|
- checkout
|
||||||
|
- run: sudo pip install torch
|
||||||
|
- run: sudo pip install --progress-bar off .
|
||||||
|
- run: sudo pip install pytest pytest-xdist
|
||||||
|
- run: sudo pip install tensorboardX scikit-learn
|
||||||
|
- run: python -m pytest -n 8 --dist=loadfile -s -v ./examples/
|
||||||
deploy_doc:
|
deploy_doc:
|
||||||
working_directory: ~/transformers
|
working_directory: ~/transformers
|
||||||
docker:
|
docker:
|
||||||
@@ -72,7 +86,7 @@ jobs:
|
|||||||
- run: sudo pip install --progress-bar off -r docs/requirements.txt
|
- run: sudo pip install --progress-bar off -r docs/requirements.txt
|
||||||
- run: sudo pip install --progress-bar off -r requirements.txt
|
- run: sudo pip install --progress-bar off -r requirements.txt
|
||||||
- run: ./.circleci/deploy.sh
|
- run: ./.circleci/deploy.sh
|
||||||
repository_consistency:
|
check_repository_consistency:
|
||||||
working_directory: ~/transformers
|
working_directory: ~/transformers
|
||||||
docker:
|
docker:
|
||||||
- image: circleci/python:3.5
|
- image: circleci/python:3.5
|
||||||
@@ -91,9 +105,10 @@ workflows:
|
|||||||
version: 2
|
version: 2
|
||||||
build_and_test:
|
build_and_test:
|
||||||
jobs:
|
jobs:
|
||||||
- repository_consistency
|
- check_repository_consistency
|
||||||
- build_py3_custom_tokenizers
|
- run_examples_py3_torch
|
||||||
- build_py3_torch_and_tf
|
- run_tests_py3_custom_tokenizers
|
||||||
- build_py3_torch
|
- run_tests_py3_torch_and_tf
|
||||||
- build_py3_tf
|
- run_tests_py3_torch
|
||||||
|
- run_tests_py3_tf
|
||||||
- deploy_doc: *workflow_filters
|
- deploy_doc: *workflow_filters
|
||||||
|
|||||||
Reference in New Issue
Block a user