Skip to content

Commit

Permalink
Merge pull request #480 from redis/fix-subpkg-ci
Browse files Browse the repository at this point in the history
ci: run tests of sub go.mod on circleci
  • Loading branch information
rueian authored Feb 25, 2024
2 parents 8e58652 + c346ca1 commit 16d5f13
Showing 1 changed file with 51 additions and 2 deletions.
53 changes: 51 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,61 @@ jobs:
- checkout
- go/install:
version: 1.21.0
- run:
- run: # test ./go.mod
command: |
list=$(go list ./... | circleci tests split --split-by=timings)
echo "Test Packages: $list"
for n in {1..5}; do ./dockertest.sh $list && break; done
no_output_timeout: 15m

- run: # test ./rueidishook/go.mod
command: |
cd $CIRCLE_WORKING_DIRECTORY/rueidishook
list=$(go list ./... | circleci tests split --split-by=timings)
echo "Test Packages: $list"
for n in {1..5}; do ../dockertest.sh $list && break; done
no_output_timeout: 15m

- run: # test ./mock/go.mod
command: |
cd $CIRCLE_WORKING_DIRECTORY/mock
list=$(go list ./... | circleci tests split --split-by=timings)
echo "Test Packages: $list"
for n in {1..5}; do ../dockertest.sh $list && break; done
no_output_timeout: 15m

- run: # test ./om/go.mod
command: |
cd $CIRCLE_WORKING_DIRECTORY/om
list=$(go list ./... | circleci tests split --split-by=timings)
echo "Test Packages: $list"
for n in {1..5}; do ../dockertest.sh $list && break; done
no_output_timeout: 15m

- run: # test ./rueidisaside/go.mod
command: |
cd $CIRCLE_WORKING_DIRECTORY/rueidisaside
list=$(go list ./... | circleci tests split --split-by=timings)
echo "Test Packages: $list"
for n in {1..5}; do ../dockertest.sh $list && break; done
no_output_timeout: 15m

- run: # test ./rueidiscompat/go.mod
command: |
cd $CIRCLE_WORKING_DIRECTORY/rueidiscompat
list=$(go list ./... | circleci tests split --split-by=timings)
echo "Test Packages: $list"
for n in {1..5}; do ../dockertest.sh $list && break; done
no_output_timeout: 15m

- run: # test ./rueidisotel/go.mod
command: |
cd $CIRCLE_WORKING_DIRECTORY/rueidisotel
list=$(go list ./... | circleci tests split --split-by=timings)
echo "Test Packages: $list"
for n in {1..5}; do ../dockertest.sh $list && break; done
no_output_timeout: 15m

- store_test_results:
path: unit-tests.xml
path: .
- run: curl -Os https://uploader.codecov.io/latest/linux/codecov && chmod +x codecov && ./codecov -t ${CODECOV_TOKEN}

0 comments on commit 16d5f13

Please sign in to comment.