diff options
author | Evan Read <eread@gitlab.com> | 2022-06-13 05:02:38 +0300 |
---|---|---|
committer | Marcel Amirault <mamirault@gitlab.com> | 2022-06-13 05:02:38 +0300 |
commit | 979558969476a6b3ee3d5fe1eeb99b42d47486e9 (patch) | |
tree | cc1ebb4e095c483b11785a35f14b1b4f62adb457 | |
parent | fef84c1eb52354395c42b8087aca5db67b890f2b (diff) |
Add Markdownlint to pipeline
-rw-r--r-- | .gitlab-ci.yml | 13 | ||||
-rw-r--r-- | doc/testing.md | 27 |
2 files changed, 30 insertions, 10 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 234a9f07..c160e311 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -354,6 +354,19 @@ yaml_lint: - yamllint .gitlab-ci.yml content/_data # +# Run markdownlint tests +# +markdownlint: + extends: + - .rules_site_tests + - .cache_yarn + - .yarn + needs: [] + stage: test + 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). |