Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-docs.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvan Read <eread@gitlab.com>2022-06-10 08:32:15 +0300
committerEvan Read <eread@gitlab.com>2022-06-10 08:35:45 +0300
commit14e3541cf233fe6fe3a0e12b787417600ed40188 (patch)
tree2ca5b70bb4ac2d14ea061a75a32762f8f91527f0
parent8429baee264e827099e1f352c9698793149cfc88 (diff)
Add Markdownlint to pipelineeread/add-markdownlint-to-pipeline
Also extend testing documentation.
-rw-r--r--.gitlab-ci.yml17
-rw-r--r--doc/testing.md27
2 files changed, 34 insertions, 10 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 234a9f07..04752328 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -354,6 +354,23 @@ yaml_lint:
- yamllint .gitlab-ci.yml content/_data
#
+# Run markdownlint tests
+#
+markdownlint:
+ extends:
+ - .rules_site_tests
+ - .cache_yarn
+ - .yarn
+ needs: []
+ stage: test
+ rules:
+ - if: $CI_PIPELINE_SOURCE == "merge_request_event"
+ changes:
+ - doc/**/*.md
+ script:
+ - make markdownlint-tests
+
+#
# Check for broken external links
#
test_external_links:
diff --git a/doc/testing.md b/doc/testing.md
index 27e0a53f..9809fc61 100644
--- a/doc/testing.md
+++ b/doc/testing.md
@@ -10,24 +10,31 @@ configured in the project's [`.gitlab-ci.yml`](../.gitlab-ci.yml) file.
These code tests are included in the project:
-| Test target | Tool | Purpose |
-|:------------|:------------|:------------------|
-| CSS | Stylelint | Code quality |
-| Dockerfiles | Hadolint | Syntax checks |
-| JavaScript | ESLint | Syntax checks |
-| JavaScript | Prettier | Code formatting |
-| Ruby | RSpec | Unit tests |
-| Vue | Jest | Unit tests |
-| YAML | yamllint | Syntax checks |
+| Test target | Tool | Make target | Purpose |
+|:----------- |:-------------|:---------------------|:-------------------------------------------|
+| CSS | Stylelint | `stylelint-tests` | Code quality |
+| Dockerfiles | Hadolint | `hadolint-tests` | Syntax checks |
+| JavaScript | ESLint | `eslint-tests` | Syntax checks |
+| JavaScript | Prettier | `prettier-tests` | Code formatting |
+| Markdown | markdownlint | `markdownlint-tests` | Documentation formatting and syntax checks |
+| Ruby | RSpec | `rspec-tests` | Unit tests |
+| Vue | Jest | `jest-tests` | Unit tests |
+| YAML | yamllint | `yamllint-tests` | Syntax checks |
### Run code tests locally
-To run the tests:
+To run all tests:
```shell
make test
```
+You can also run tests individually by specifying the Make target. For example, to run RSpec tests only:
+
+```shell
+make rspec-tests
+```
+
### Install Lefthook
If you want to run the tests before pushing changes, use [Lefthook](https://github.com/evilmartians/lefthook#readme).