Skip to content
This repository was archived by the owner on Sep 9, 2026. It is now read-only.

Commit bf74ec6

Browse files
authored
test: reduce test time (#118)
* test: reduce test time * fix: try fixing codecov coverage issue * fix: try fixing codecov issue * feat: try add name back to codecov * fix: remove codecov name * refactor: add more paths
1 parent 444ae47 commit bf74ec6

2 files changed

Lines changed: 11 additions & 5 deletions

File tree

.github/workflows/ci.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,11 +125,10 @@ jobs:
125125
with:
126126
files: "coverage.xml"
127127
- name: Upload coverage from test to Codecov
128-
uses: codecov/codecov-action@v1
128+
uses: codecov/codecov-action@v2
129129
if: steps.check_files.outputs.files_exists == 'true' && ${{ matrix.python-version }} == '3.7'
130130
with:
131131
file: coverage.xml
132-
name: ${{ matrix.test-path }}-codecov
133132
flags: ${{ steps.test.outputs.codecov_flag }}
134133
fail_ci_if_error: false
135134
token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos

scripts/get-all-test-paths.sh

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,15 @@
22

33
set -ex
44

5-
declare -a array1=( "tests/unit/*.py")
6-
declare -a array2=( $(ls -d tests/unit/*/ | grep -v '__pycache__' ))
7-
dest=( "${array1[@]}" "${array2[@]}" )
5+
BATCH_SIZE=5
6+
declare -a array1=( "tests/unit/*.py" )
7+
declare -a array2=( $(ls -d tests/unit/*/ | grep -v '__pycache__' | grep -v 'array') )
8+
declare -a array3=( "tests/unit/array/*.py" )
9+
declare -a mixins=( $(find tests/unit/array/mixins -name "*.py") )
10+
declare -a array4=( "$(echo "${mixins[@]}" | xargs -n$BATCH_SIZE)" )
11+
# array5 is currently empty because in the array/ directory, mixins is the only directory
12+
# but add the following in case new directories are created in array/
13+
declare -a array5=( $(ls -d tests/unit/array/*/ | grep -v '__pycache__' | grep -v 'mixins') )
14+
dest=( "${array1[@]}" "${array2[@]}" "${array3[@]}" "${array4[@]}" "${array5[@]}" )
815

916
printf '%s\n' "${dest[@]}" | jq -R . | jq -cs .

0 commit comments

Comments
 (0)