Skip to content

Commit

Permalink
ci: checks markdown for bad links (#212)
Browse files Browse the repository at this point in the history
Signed-off-by: Adrian Cole <[email protected]>
  • Loading branch information
codefromthecrypt authored Jan 13, 2024
1 parent a2f8805 commit 31ab49f
Show file tree
Hide file tree
Showing 6 changed files with 56 additions and 6 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/test_markdown.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# yamllint --format github .github/workflows/test_markdown.yml
---
name: test_markdown

on: # yamllint disable-line rule:truthy
push: # non-tagged pushes to master
branches:
- master
tags-ignore:
- '*'
paths:
- '**/*.md'
- ./build-bin/mlc_config.json
pull_request: # pull requests targeted at the master branch.
branches:
- master
paths:
- '**/*.md'
- ./build-bin/mlc_config.json

jobs:
test-markdown:
name: Test Markdown
runs-on: ubuntu-22.04 # newest available distribution, aka jellyfish
# skip commits made by the release plugin
if: "!contains(github.event.head_commit.message, 'maven-release-plugin')"
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Check Markdown links
uses: gaurav-nelson/github-action-markdown-link-check@v1
with:
config-file: './build-bin/mlc_config.json'
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ Api and all collector components.

| Storage | Description |
|--------------------------------------------|-----------------------------|
| [Stackdriver Trace](./storage/stackdriver) | Free cloud service provider |
| [Stackdriver Trace](./storage-stackdriver) | Free cloud service provider |

## Server integration
In order to integrate with zipkin-server, you need to use properties
Expand Down Expand Up @@ -79,7 +79,7 @@ $ STORAGE_TYPE=stackdriver STACKDRIVER_PROJECT_ID=zipkin-demo \
If you cannot use our [Docker image](./docker/README.md), you can still integrate
yourself by downloading a couple jars.

[Here's an example](autoconfigure/storage-stackdriver#quick-start) of
[Here's an example](module/README.md#quick-start) of
integrating Stackdriver storage.

## Troubleshooting
Expand Down
11 changes: 9 additions & 2 deletions build-bin/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,15 @@ This is a Maven+Docker project, which uses standard conventions for test and dep
The Docker image for zipkin-gcp is a layer over zipkin, including only the [../module] and
configuration settings.

[docker-compose-zipkin-gcp.xml] ensures GCP authentication works. It is not run on pull request, as
the required secure variable is only available on master push.
[docker-compose-zipkin-gcp.xml](docker-compose-zipkin-gcp.yml) ensures GCP authentication works.
It is not run on pull request, as the required secure variable is only available on master push.

[mlc_config.json](mlc_config.json) is run by GitHub Action, but you can also run it locally,
assuming you installed markdown-link-check via NPM.

```bash
$ find . -name \*.md |xargs markdown-link-check -c ./build-bin/mlc_config.json
```

[//]: # (Below here should be standard for all projects)

Expand Down
10 changes: 10 additions & 0 deletions build-bin/mlc_config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"ignorePatterns": [
{
"pattern": "https://oss.sonatype.org/content/repositories/snapshots"
},
{
"pattern": "http://localhost:9411/api/v[12]/spans"
}
]
}
2 changes: 1 addition & 1 deletion docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ In docker, the following can also be set:

### Stackdriver

Stackdriver Configuration variables are detailed [here](../module/storage-stackdriver#configuration).
Stackdriver Configuration variables are detailed [here](../module/README.md#configuration).

## Building

Expand Down
2 changes: 1 addition & 1 deletion module/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ The Zipkin server can be further configured as described in the

Configuration can be applied either through environment variables or an external Zipkin
configuration file. The module includes default configuration that can be used as a
[reference](https://github.com/openzipkin/zipkin-gcp/tree/master/autoconfigure/storage-stackdriver/src/main/resources/zipkin-server-stackdriver.yml)
[reference](./src/main/resources/zipkin-server-gcp.yml)
for users that prefer a file based approach.

#### Environment Variables
Expand Down

0 comments on commit 31ab49f

Please sign in to comment.