Skip to content

Commit 4da567c

Browse files
authored
setup(ci): add markdown changes validation
1 parent 3f4e76c commit 4da567c

File tree

3 files changed

+21
-8
lines changed

3 files changed

+21
-8
lines changed

.github/workflows/validate_new_changes.yml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,24 @@ on:
44
pull_request: # yamllint disable-line rule:empty-values
55

66
jobs:
7-
validate-new-changes:
7+
validate-yaml-changes:
88
runs-on: "ubuntu-latest"
9-
# NOTE: validating new changes takes around 1 minute.
9+
# NOTE: validating YAML changes takes around 1 minute.
1010
# If this job takes more than 5 minutes, it means that something is wrong.
1111
timeout-minutes: 5
1212
steps:
1313
- name: "Checkout ${{ github.event.repository.name }}"
1414
uses: "actions/checkout@v4"
1515
- name: "Run YAML linter"
1616
run: "docker run --rm -v ${{ github.workspace }}:/linter_workdir/repo spawnlang/yaml-linter:latest"
17+
18+
validate-markdown-changes:
19+
runs-on: "ubuntu-latest"
20+
# NOTE: validating Markdown changes takes around 1 minute.
21+
# If this job takes more than 5 minutes, it means that something is wrong.
22+
timeout-minutes: 5
23+
steps:
24+
- name: "Checkout ${{ github.event.repository.name }}"
25+
uses: "actions/checkout@v4"
26+
- name: "Run Markdown linter"
27+
run: "docker run --rm -v ${{ github.workspace }}:/linter_workdir/repo spawnlang/markdown-linter:latest"

README.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ run, edit and share Spawn code online.
1212
- Ability to [run code as tests](https://docs.spawnlang.dev/tools/playground.html#test)
1313
- Ability to [see generated C code](https://docs.spawnlang.dev/tools/playground.html#show-generated-c-code)
1414
for passed Spawn code
15-
- Pass [flags](https://docs.spawnlang.dev/tools/playground.html#pass-arguments-to-compiler) to Spawn
16-
compiler and binary
17-
- [Shareable](https://docs.spawnlang.dev/tools/playground.html#share-code) code and editor state
18-
via URL or local storage
15+
- Pass [flags](https://docs.spawnlang.dev/tools/playground.html#pass-arguments-to-compiler)
16+
to Spawn compiler and binary
17+
- [Shareable](https://docs.spawnlang.dev/tools/playground.html#share-code) code
18+
and editor state via URL or local storage
1919

2020
## Developing
2121

@@ -52,7 +52,8 @@ then access the playground at <http://localhost:5555>
5252

5353
## Server API
5454

55-
See [server/README.md](./server/README.md) for more information about the server API.
55+
See [server/README.md](./server/README.md) for more information about the server
56+
API.
5657

5758
## License
5859

server/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,8 @@ Additional form fields:
5656
#### Request
5757

5858
```curl
59-
curl -X POST localhost:5555/run_test -F 'code="fn test_foo() { assert 100 == 100 }"'
59+
curl -X POST localhost:5555/run_test \
60+
-F 'code="fn test_foo() { assert 100 == 100 }"'
6061
```
6162

6263
#### Response

0 commit comments

Comments
 (0)