Skip to content
This repository has been archived by the owner on Dec 15, 2023. It is now read-only.

💚 ⚡️ Fix circleci test split #140

Merged
merged 8 commits into from
Jun 24, 2022
Merged
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
16 changes: 10 additions & 6 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
docker:
- image: cimg/python:3.7.12-node
resource_class: medium
parallelism: 2
parallelism: 4
FabijanC marked this conversation as resolved.
Show resolved Hide resolved
steps:
- checkout
- run:
Expand All @@ -31,18 +31,22 @@ jobs:
- run:
name: Compile test contracts
command: ./scripts/compile_contracts.sh
- run:
name: Check out previous test metadata
command: |
jq . "${CIRCLE_INTERNAL_TASK_DATA}/circle-test-results/results.json"
- run:
name: Run pytest tests
parallel: true
command: |
TESTFILES=$(
circleci tests glob test/test*.py |
circleci tests split --split-by=timings --timings-type=classname
)
mkdir -p test-results
poetry run pytest -s --junitxml=test-results/junit.xml -vv $TESTFILES
SPLITED_FILES_CLASS=$(circleci tests glob test/test*.py | sed "s/\.py//g; s/\//./g" | circleci tests split --split-by=timings --timings-type=classname)
FabijanC marked this conversation as resolved.
Show resolved Hide resolved
TEST_FILES=$(sed "s/\./\//g; s/ /.py /g; s/$/.py/g;" \<<< $SPLITED_FILES_CLASS)
poetry run pytest -s -v --junitxml=test-results/junit.xml $TEST_FILES
- store_test_results:
path: test-results
- store_artifacts:
path: test-results

test-py-max:
<<: *test-template
Expand Down