From 01742b7400592bd8d21b715edccf097c1d8816d1 Mon Sep 17 00:00:00 2001 From: Alexander Wang Date: Fri, 30 Dec 2022 10:04:43 -0800 Subject: [PATCH] update --- ci/sub | 2 +- docs/CONTRIBUTING.md | 21 +++++++++++++++------ 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/ci/sub b/ci/sub index 79b9dadce..b1ec0a8d4 160000 --- a/ci/sub +++ b/ci/sub @@ -1 +1 @@ -Subproject commit 79b9dadce090a95b5a50d32f9ea3927845e5cce1 +Subproject commit b1ec0a8d430a62b7556211ed8bcd7b6e41e2362c diff --git a/docs/CONTRIBUTING.md b/docs/CONTRIBUTING.md index 6c607e01f..784636109 100644 --- a/docs/CONTRIBUTING.md +++ b/docs/CONTRIBUTING.md @@ -22,6 +22,20 @@ Most of D2's CI is open sourced in its own workflows. E.g. run `./make.sh fmt` to run the formatter. Please make sure all CI is passing for any PRs. +Most of the CI scripts rely on a submodule shared between many D2 repositories: +[https://github.com/terrastruct/ci](https://github.com/terrastruct/ci). You should fetch +the submodule whenever it differs: + +```sh +git submodule update --recursive +``` + +If running for the first time for a repo (e.g. new clone), add `--init`: + +```sh +git submodule update --init --recursive +``` + ## Flow The simplified D2 flow at a package level looks like: @@ -54,7 +68,7 @@ start work on an Issue, please leave a comment so others know that it's being wo ### Tests -All code changes must include tests. D2 mostly has functional tests (see `e2etests` directory), and uses +All code changes must include tests. D2 mostly has functional tests, and uses [diff](https://github.com/terrastruct/diff) as a framework that gives Git-style comparisons of expected vs actual output for each stage. There are ample examples in each package of this -- try changing some test and run it to see. @@ -82,11 +96,6 @@ Run: `./ci/test.sh` CI runs tests with `-race` to catch potential race conditions. It's much slower, but if your machine can run it locally, you can do so with `./make.sh race`. -If you had to change/add functional test cases (under `e2etests` directory), make sure -you updated them before opening a PR. - -Run: `TESTDATA_ACCEPT=1 ./ci/test.sh` or `TA=1 ./ci/test.sh` for a shorter version. - #### Chaos tests D2 has [chaos tests](https://en.wikipedia.org/wiki/Chaos_engineering) which produce random