Skip to content

Commit fbd56ae

Browse files
Move DocC and integration tests into separate CI pipelines (#23)
### Motivation Like many other projects, we have a soundness script which runs in CI. It started out with some fast policy and style tests but has grown over time. It currently has: 1. Check for broken symlinks 2. Check for unacceptable language 3. Check all files have a license headers 4. Run swift-format lint 5. Check DocC compiliation has no warnings 6. Run integration test On my machine, (5) takes 11s and (6) takes 1m13s. The soundness script should be cheap to run so as not to disclosure running it often—potentially even adding it to a precommit hook. Removing (5) and (6) from the soundness suite means it takes 3s, which is more reasonable. ### Modifications - Add `integration-test` to Compose file. - Add `docc-test` to Compose file. - Stop running DocC and integration tests in `soundness.sh`. ### Result Running `soundness.sh` takes 3s (was ~1m30s). ### Test Plan The following commands all succeed when run locally: - `./scripts/soundness.sh` - `docker-compose -f docker/docker-compose.yaml run soundness` - `docker-compose -f docker/docker-compose.yaml run docc-test` - `docker-compose -f docker/docker-compose.yaml run integration-test` ### Notes This PR should be used to stand up the new CI pipelines and shouldn't be merged until we see them passing.
1 parent 12e4668 commit fbd56ae

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

docker/docker-compose.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,13 @@ services:
3535
shell:
3636
<<: *common
3737
entrypoint: /bin/bash
38+
39+
integration-test:
40+
<<: *common
41+
command: /bin/bash -xcl "swift -version && uname -a && bash ./scripts/run-integration-test.sh"
42+
43+
docc-test:
44+
<<: *common
45+
command: /bin/bash -xcl "swift -version && uname -a && bash ./scripts/check-for-docc-warnings.sh"
46+
environment:
47+
DOCC_TARGET: OpenAPIRuntime

scripts/soundness.sh

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,12 @@ fatal() { error "$@"; exit 1; }
2020

2121
CURRENT_SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
2222
NUM_CHECKS_FAILED=0
23-
export DOCC_TARGET=OpenAPIRuntime
2423

2524
SCRIPT_PATHS=(
2625
"${CURRENT_SCRIPT_DIR}/check-for-broken-symlinks.sh"
2726
"${CURRENT_SCRIPT_DIR}/check-for-unacceptable-language.sh"
2827
"${CURRENT_SCRIPT_DIR}/check-license-headers.sh"
2928
"${CURRENT_SCRIPT_DIR}/run-swift-format.sh"
30-
"${CURRENT_SCRIPT_DIR}/check-for-docc-warnings.sh"
31-
"${CURRENT_SCRIPT_DIR}/run-integration-test.sh"
3229
)
3330

3431
for SCRIPT_PATH in "${SCRIPT_PATHS[@]}"; do

0 commit comments

Comments
 (0)