Skip to content

Commit 7ed73ef

Browse files
Move DocC and integration tests into separate CI pipelines (#110)
### 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 19s 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 ec7a1c5 commit 7ed73ef

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

docker/docker-compose.yaml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@ services:
2727
soundness:
2828
<<: *common
2929
command: /bin/bash -xcl "swift -version && uname -a && ./scripts/soundness.sh"
30-
environment:
31-
SWIFT_OPENAPI_GENERATOR_REPO_URL: file:///code
3230

3331
test:
3432
<<: *common
@@ -38,3 +36,14 @@ services:
3836
<<: *common
3937
entrypoint: /bin/bash
4038

39+
integration-test:
40+
<<: *common
41+
command: /bin/bash -xcl "swift -version && uname -a && bash ./scripts/run-integration-test.sh"
42+
environment:
43+
SWIFT_OPENAPI_GENERATOR_REPO_URL: file:///code
44+
45+
docc-test:
46+
<<: *common
47+
command: /bin/bash -xcl "swift -version && uname -a && bash ./scripts/check-for-docc-warnings.sh"
48+
environment:
49+
DOCC_TARGET: swift-openapi-generator

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=swift-openapi-generator
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)