Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Merged by Bors] - GitHub Action: Check local Markdown links on push #2067

Closed
wants to merge 32 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
b472782
Add GitHub action to check links in Markdown files
FlyingRatBull May 1, 2021
0253fe9
Update action.yml
FlyingRatBull May 1, 2021
62d623a
Create mlc_config.json
FlyingRatBull May 1, 2021
9d0ebf4
Update action.yml
FlyingRatBull May 1, 2021
d5b7e80
Pin version 1.0.12 of gaurav-nelson/github-action-markdown-link-check
FlyingRatBull May 1, 2021
ee66c17
Update mlc_config.json
FlyingRatBull May 1, 2021
7676dff
Update mlc_config.json
FlyingRatBull May 1, 2021
1168389
Add check-markdown-links to ci.yml
FlyingRatBull May 1, 2021
1e41dc2
Delete action.yml
FlyingRatBull May 1, 2021
db38b5a
Add check-markdown-links to bors.toml
FlyingRatBull May 1, 2021
1666502
Moved markdown-link-check config
FlyingRatBull May 1, 2021
8df3dd8
Ignore broken developer.android.com link in examples/README.md
FlyingRatBull May 1, 2021
3c644bd
Fix broken link to .markdown-lint.yml in docs/linters.md (#2065)
FlyingRatBull May 1, 2021
4e5210f
Fix broken link to PBR example in README.md (#2064)
FlyingRatBull May 1, 2021
82014a3
Fix broken link to touch_input_events example (#2066)
FlyingRatBull May 1, 2021
5b8db27
Fix broken link to .markdown-lint.yml in docs/linters.md (#2065)
FlyingRatBull May 1, 2021
0d5afeb
Fix broken link to PBR example in README.md (#2064)
FlyingRatBull May 1, 2021
e7ede2e
Fix broken link to touch_input_events example (#2066)
FlyingRatBull May 1, 2021
36e679c
Add GitHub action to check links in Markdown files
FlyingRatBull May 1, 2021
822c3fa
Update action.yml
FlyingRatBull May 1, 2021
0458245
Create mlc_config.json
FlyingRatBull May 1, 2021
d23997e
Update action.yml
FlyingRatBull May 1, 2021
75e5843
Pin version 1.0.12 of gaurav-nelson/github-action-markdown-link-check
FlyingRatBull May 1, 2021
606a826
Update mlc_config.json
FlyingRatBull May 1, 2021
6269655
Update mlc_config.json
FlyingRatBull May 1, 2021
1d111b1
Add check-markdown-links to ci.yml
FlyingRatBull May 1, 2021
5facb67
Delete action.yml
FlyingRatBull May 1, 2021
7c42ec8
Add check-markdown-links to bors.toml
FlyingRatBull May 1, 2021
2c9bf36
Moved markdown-link-check config
FlyingRatBull May 1, 2021
a5dac8e
Ignore broken developer.android.com link in examples/README.md
FlyingRatBull May 1, 2021
eb5e9f7
Merge remote-tracking branch 'origin/main' into main
FlyingRatBull May 1, 2021
7d8ccea
Fixed missing broken Markdown link
FlyingRatBull May 1, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/bors.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ status = [
"build-wasm (nightly, ubuntu-latest)",
"build-android",
"markdownlint",
"check-markdown-links",
"run-examples",
"check-doc",
]
Expand Down
21 changes: 21 additions & 0 deletions .github/linters/markdown-link-check.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"ignorePatterns": [
{
"pattern": "^https?://github\\.com/"
}
],
"replacementPatterns": [],
"httpHeaders": [
{
"urls": ["https://crates.io"],
"headers": {
"Accept": "text/html"
}
}
],
"timeout": "20s",
"retryOn429": true,
"retryCount": 5,
"fallbackRetryDelay": "30s",
"aliveStatusCodes": [200, 206]
}
10 changes: 10 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,16 @@ jobs:
# Not needed here as only one Linter is used.
#GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

check-markdown-links:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: gaurav-nelson/github-action-markdown-link-check@0fe4911067fa322422f325b002d2038ba5602170
with:
use-quiet-mode: 'yes'
use-verbose-mode: 'yes'
config-file: '.github/linters/markdown-link-check.json'

run-examples:
runs-on: ubuntu-latest

Expand Down
4 changes: 2 additions & 2 deletions docs/linters.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@ Explanation:
### [markdownlint](https:/DavidAnson/markdownlint)

`markdownlint` is provided by `super-linter` and is responsible for `.md` files.
Its configuration is saved in the [.markdown-lint.yml](../.github/linters/markdown-lint.yml) file.
Its configuration is saved in the [.markdown-lint.yml](../.github/linters/.markdown-lint.yml) file.

The provided rules are documented [here](https:/DavidAnson/markdownlint/blob/main/doc/Rules.md) and information about setting the config can be seen [here](https:/DavidAnson/markdownlint#optionsconfig).

#### Using [VS Code markdownlint](https://marketplace.visualstudio.com/items?itemName=DavidAnson.vscode-markdownlint)

If you want to use the VS Code Extension with the rules defined in [.markdown-lint.yml](../.github/linters/markdown-lint.yml), then you need to create a local config file in the root of the project with the configuration below.
If you want to use the VS Code Extension with the rules defined in [.markdown-lint.yml](../.github/linters/.markdown-lint.yml), then you need to create a local config file in the root of the project with the configuration below.
Currently, this is not needed as the extension already disables the rule `MD013` by default.

```json
Expand Down
8 changes: 5 additions & 3 deletions examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ Example | File | Description
`msaa` | [`3d/msaa.rs`](./3d/msaa.rs) | Configures MSAA (Multi-Sample Anti-Aliasing) for smoother edges
`orthographic` | [`3d/orthographic.rs`](./3d/orthographic.rs) | Shows how to create a 3D orthographic view (for isometric-look games or CAD applications)
`parenting` | [`3d/parenting.rs`](./3d/parenting.rs) | Demonstrates parent->child relationships and relative transformations
`pbr` | [`3d/pbr.rs`](./3d/[pbr].rs) | Demonstrates use of Physically Based Rendering (PBR) properties
`pbr` | [`3d/pbr.rs`](./3d/pbr.rs) | Demonstrates use of Physically Based Rendering (PBR) properties
`render_to_texture` | [`3d/render_to_texture.rs`](./3d/render_to_texture.rs) | Shows how to render to texture
`spawner` | [`3d/spawner.rs`](./3d/spawner.rs) | Renders a large number of cubes with changing position and material
`texture` | [`3d/texture.rs`](./3d/texture.rs) | Shows configuration of texture materials
Expand Down Expand Up @@ -183,7 +183,7 @@ Example | File | Description
`mouse_input` | [`input/mouse_input.rs`](./input/mouse_input.rs) | Demonstrates handling a mouse button press/release
`mouse_input_events` | [`input/mouse_input_events.rs`](./input/mouse_input_events.rs) | Prints out all mouse events (buttons, movement, etc.)
`touch_input` | [`input/touch_input.rs`](./input/touch_input.rs) | Displays touch presses, releases, and cancels
`touch_input_events` | [`input/touch_input_events.rs`](./input/touch_input_input_events.rs) | Prints out all touch inputs
`touch_input_events` | [`input/touch_input_events.rs`](./input/touch_input_events.rs) | Prints out all touch inputs

## Reflection

Expand Down Expand Up @@ -280,7 +280,9 @@ Please reference `cargo-apk` [README](https://crates.io/crates/cargo-apk) for ot

### Old phones

Bevy by default targets Android API level 29 in its examples which is the [Play Store's minimum API to upload or update apps](https://developer.android.com/distribute/best-practices/develop/target-sdk). Users of older phones may want to use an older API when testing.
Bevy by default targets Android API level 29 in its examples which is the <!-- markdown-link-check-disable -->
[Play Store's minimum API to upload or update apps](https://developer.android.com/distribute/best-practices/develop/target-sdk). <!-- markdown-link-check-enable -->
Users of older phones may want to use an older API when testing.

To use a different API, the following fields must be updated in Cargo.toml:

Expand Down