Skip to content

Commit e47fa5e

Browse files
committed
Document GitLab CI
1 parent 177b548 commit e47fa5e

File tree

7 files changed

+37
-4
lines changed

7 files changed

+37
-4
lines changed

astro.config.mjs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,10 @@ export default defineConfig({
7575
},
7676
{
7777
label: "Continuous integration",
78-
items: ["github_action_recipes/check-repository"],
78+
items: [
79+
"continuous-integration/github",
80+
"continuous-integration/gitlab",
81+
],
7982
},
8083
{
8184
label: "Troubleshooting",

src/content/docs/github_action_recipes/check-repository.mdx renamed to src/content/docs/continuous-integration/github.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: GitHub CI action recipes
2+
title: GitHub CI recipes
33
---
44

55
import CodeBlock from "../../../components/code.astro";
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
---
2+
title: GitLab CI recipes
3+
---
4+
5+
import CodeBlock from "../../../components/code.astro";
6+
import { Aside } from "@astrojs/starlight/components";
7+
8+
## Basic example
9+
10+
This recipe demonstrates how to set up a CI job to check links in a repository.
11+
GitLab integrates nicely with the JUnit XML report format.
12+
This makes it easy to visualise link check results as test reports,
13+
as shown in the below screenshot.
14+
15+
![The GitLab PR showing a test summary where 2 out of 12 tests failed, where each test indicates a link check](images/junit-annotations-gitlab.png)
16+
17+
```yaml
18+
Check links:
19+
stage: test
20+
script:
21+
- apt-get update -qq && apt-get install -y -qq wget
22+
# recommended to pin a stable version such as "lychee-v0.24.0"
23+
- version="nightly"
24+
- wget -qO- "https://github.com/lycheeverse/lychee/releases/download/$version/lychee-x86_64-unknown-linux-gnu.tar.gz" | tar -xz
25+
- ./lychee --verbose --include-mail --format junit --output results.xml TEST.md
26+
artifacts:
27+
when: always
28+
reports:
29+
junit: results.xml
30+
```
55.7 KB
Loading

src/content/docs/github_action_recipes/images/junit-inline-annotations.png renamed to src/content/docs/continuous-integration/images/junit-inline-annotations.png

File renamed without changes.

src/content/docs/recipes/caching.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,4 @@ docker run -it -v $(pwd)/.lycheecache:/.lycheecache lycheeverse/lychee --cache -
4545

4646
## Caching in GitHub Actions
4747

48-
To see how you can cache the results of a lychee run in GitHub Actions, [check out this page](/github_action_recipes/caching).
48+
To see how you can cache the results of a lychee run in GitHub Actions, [check out this page](/continuous-integration/github#caching).

src/content/docs/troubleshooting/rate-limits.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,4 +78,4 @@ If the `--cache` flag is used, this can also help to reduce the amount of calls
7878
that are sent to a page because only links that exceed the cache age are queried
7979
again. This value can be adjusted with `--max-cache-age`, e.g. `12h`.
8080
If you run into rate-limiting issues when using the GitHub Action,
81-
see the [caching configuration here](/github_action_recipes/caching).
81+
see the [caching configuration here](/continuous-integration/github#caching).

0 commit comments

Comments
 (0)