chore: group tests and adjust parallelism

This commit is contained in:
Jose Diaz-Gonzalez
2020-06-20 17:03:49 -04:00
parent 008b362751
commit 42a46df51f

View File

@@ -26,6 +26,26 @@ commands:
- run: - run:
name: dokku report name: dokku report
command: dokku report command: dokku report
run-bats:
description: "Run bats tests"
parameters:
index:
type: string
steps:
- run:
shell: /bin/bash
command: |
mkdir -p test-results/bats
cd tests/unit
echo "executing tests: $(ls << parameters.index >>*.bats | xargs)"
sudo -E bats --formatter bats-format-junit -e -T -o ../../test-results/bats $(ls << parameters.index >>*.bats | xargs)
no_output_timeout: 60m
- store_artifacts:
path: ./test-results
destination: test-results
- store_test_results:
path: test-results
executors: executors:
default: default:
@@ -74,26 +94,35 @@ jobs:
esac esac
- store_artifacts: - store_artifacts:
path: ./coverage.out path: ./coverage.out
test: quick-test:
executor: default executor: default
parameters: parameters:
index: index:
type: string type: string
steps: steps:
- init-tests - init-tests
- run: - run-bats:
shell: /bin/bash index: << parameters.index >>
command: | medium-test:
mkdir -p test-results/bats executor: default
cd tests/unit parallelism: 1
echo "executing tests: $(ls << parameters.index >>*.bats | xargs)" parameters:
sudo -E bats --formatter bats-format-junit -e -T -o ../../test-results/bats $(ls << parameters.index >>*.bats | xargs) index:
no_output_timeout: 60m type: string
- store_artifacts: steps:
path: ./test-results - init-tests
destination: test-results - run-bats:
- store_test_results: index: << parameters.index >>
path: test-results slow-test:
executor: default
parallelism: 1
parameters:
index:
type: string
steps:
- init-tests
- run-bats:
index: << parameters.index >>
workflows: workflows:
workflow: workflow:
@@ -102,52 +131,68 @@ workflows:
- docker-deploy-tests: - docker-deploy-tests:
requires: requires:
- build - build
- test - quick-test
- medium-test
- slow-test
- go-tests: - go-tests:
matrix: matrix:
parameters: parameters:
index: [0, 1, 2, 3] index: [0, 1, 2, 3]
requires: requires:
- build - build
- test - quick-test
- test: - medium-test
- slow-test
- quick-test:
matrix: matrix:
parameters: parameters:
index: index:
- app-json - app-json
- apps
- build-env
- buildpacks - buildpacks
- certs - certs
- checks
- client
- config-oddities
- config - config
- core_1 - config-oddities
- core_2
- docker-options - docker-options
- domains - domains
- events - events
- git
- init - init
- network
- nginx-vhosts_1
- nginx-vhosts_2
- nginx-vhosts_3 - nginx-vhosts_3
- plugin - plugin
- proxy - proxy
- ps-dockerfile
- ps-general - ps-general
- ps-herokuish
- repo
- report - report
- resource
- scheduler-docker-local - scheduler-docker-local
- ssh_keys - ssh_keys
- storage - storage
- tags
- tar - tar
- trace - trace
- version - version
requires: requires:
- build - build
- medium-test:
matrix:
parameters:
index:
- build-env
- checks
- client
- core_2
- network
- nginx-vhosts_1
- ps-herokuish
- repo
- tags
requires:
- build
- slow-test:
matrix:
parameters:
index:
- apps
- core_1
- git
- nginx-vhosts_2
- ps-dockerfile
- resource
requires:
- build