Skip to content

Commit

Permalink
Add infrastructure for linting docs + CI.
Browse files Browse the repository at this point in the history
  • Loading branch information
alexrp committed Jan 11, 2024
1 parent fd24c5d commit 3a97aa0
Show file tree
Hide file tree
Showing 23 changed files with 741 additions and 2 deletions.
8 changes: 7 additions & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,11 @@ max_line_length = 120
tab_width = 4
trim_trailing_whitespace = true

[*.{json,vsconfig}]
[*.json]
indent_size = 2

[*.jsonc]
indent_size = 2

[*.vsconfig]
indent_size = 2
6 changes: 6 additions & 0 deletions .fleet/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"files.exclude": [
"out",
"node_modules"
]
}
4 changes: 4 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
* text
*.verified.* text eol=lf
*.ico binary
*.png binary
*.zig eol=lf
8 changes: 8 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
# yaml-language-server: $schema=https://json.schemastore.org/dependabot-2.0.json
version: 2
updates:
- directory: /
package-ecosystem: github-actions
schedule:
interval: daily
timezone: Europe/Copenhagen
time: "12:00"
open-pull-requests-limit: 25
labels: []
- directory: /
package-ecosystem: nuget
schedule:
Expand Down
40 changes: 40 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
name: Build
on:
push:
branches-ignore:
- dependabot/**
pull_request:
workflow_dispatch:
defaults:
run:
shell: bash
env:
DOTNET_CLI_TELEMETRY_OPTOUT: true
DOTNET_GENERATE_ASPNET_CERTIFICATE: false
DOTNET_NOLOGO: true
jobs:
build:
runs-on: windows-2022
steps:
- name: Clone repository
uses: actions/[email protected]
with:
fetch-depth: 0
submodules: recursive
- name: Set up .NET
uses: actions/[email protected]
- name: Set up Node.js
uses: actions/[email protected]
with:
node-version-file: doc/package.json
- name: Run Cake
run: |
./cake
- name: Upload artifacts
if: always()
uses: actions/[email protected]
with:
name: ${{ github.workflow }}-${{ github.run_number }}-${{ github.run_attempt }}-${{ matrix.os }}-${{ matrix.cfg }}
path: |
out/log
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/out
node_modules
45 changes: 45 additions & 0 deletions .netconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
[file "doc/.markdownlint-cli2.jsonc"]
url = https://github.com/vezel-dev/.github/blob/master/syn/doc/.markdownlint-cli2.jsonc
sha = 7d581ae5eedad5892855cebc673edafad664856b
etag = 485e4786a640cfe0b7d29c169baab04e9f2a7c24964ec56b55017bc26a1d796d
weak
[file "doc/.markdownlint.json"]
url = https://github.com/vezel-dev/.github/blob/master/syn/doc/.markdownlint.json
sha = 7d581ae5eedad5892855cebc673edafad664856b
etag = d763492a10cc6e14ba8f8ffe3279eda7964580ed9e18bcd6c7875fe2f53f226b
weak
[file ".editorconfig"]
url = https://github.com/vezel-dev/.github/blob/master/syn/.editorconfig
sha = 7d581ae5eedad5892855cebc673edafad664856b
etag = 8fa5a445045c6e24f51af44560a6449adf8d297f9e0d7412b39e5e39062cde54
weak
[file ".gitattributes"]
url = https://github.com/vezel-dev/.github/blob/master/syn/.gitattributes
sha = e1d60d738e36f3741104a47c67156614aa5b9d8b
etag = 57083d3c73ff7ab2740ab17fd99d31cedcff606818190f9a415d97d27b62e7d4
weak
[file ".gitbook.yaml"]
url = https://github.com/vezel-dev/.github/blob/master/syn/.gitbook.yaml
sha = 7d581ae5eedad5892855cebc673edafad664856b
etag = 66c2b9789da757c440568a36fefd050103c146bfd88f9eb0208961fa6e08b659
weak
[file ".markdownlint.json"]
url = https://github.com/vezel-dev/.github/blob/master/syn/.markdownlint.json
sha = 7d581ae5eedad5892855cebc673edafad664856b
etag = cf98ac95cf318b52e206b9003e342de9db2ecb7be062eab6edf1681b1f374b3a
weak
[file "LICENSE-0BSD"]
url = https://github.com/vezel-dev/.github/blob/master/syn/LICENSE-0BSD
sha = 7d581ae5eedad5892855cebc673edafad664856b
etag = 4fe195e9c11a20688615d92035ac752eeac4ab3f3d82b20df798ea6dc1b49aab
weak
[file "cake"]
url = https://github.com/vezel-dev/.github/blob/master/syn/cake
sha = 7d581ae5eedad5892855cebc673edafad664856b
etag = e01672adb9650fad761fd21f0e2349afaf9294d5f00825a429ae3060a2f3576f
weak
[file "cake.config"]
url = https://github.com/vezel-dev/.github/blob/master/syn/cake.config
sha = 7d581ae5eedad5892855cebc673edafad664856b
etag = 71fbce2c699768f363332125e11b7e6335672c19932a369f7e146faf579371e9
weak
3 changes: 3 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
{
"recommendations": [
"cake-build.cake-vscode",
"chdsbd.github-code-owners",
"codezombiech.gitignore",
"davidanson.vscode-markdownlint",
"editorconfig.editorconfig",
"github.vscode-github-actions",
"github.vscode-pull-request-github",
"redhat.vscode-yaml",
"yy0931.gitconfig-lsp"
Expand Down
6 changes: 6 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"files.exclude": {
"out": true,
"**/node_modules": true
}
}
12 changes: 12 additions & 0 deletions LICENSE-0BSD
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
BSD Zero Clause License (0BSD)

Permission to use, copy, modify, and/or distribute this software for any purpose
with or without fee is hereby granted.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
THIS SOFTWARE.
33 changes: 33 additions & 0 deletions build.cake
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#addin nuget:?package=Cake.DoInDirectory&version=6.0.0
#addin nuget:?package=Cake.Npm&version=2.0.0
#addin nuget:?package=Cake.Npx&version=1.7.0

#nullable enable

// Arguments

var target = Argument("t", "default");

// Paths

var doc = Context.Environment.WorkingDirectory.Combine("doc");

// Tasks

Task("default")
.IsDependentOn("build");

Task("restore-doc")
.Does(() => DoInDirectory(doc, () => NpmInstall()));

Task("restore")
.IsDependentOn("restore-doc");

Task("build-doc")
.IsDependentOn("restore-doc")
.Does(() => DoInDirectory(doc, () => Npx("markdownlint-cli2")));

Task("build")
.IsDependentOn("build-doc");

RunTarget(target);
7 changes: 7 additions & 0 deletions cake
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env bash
set -eou pipefail

cd -- "$(dirname -- "$(readlink -e -- "${BASH_SOURCE[0]}")")"

dotnet tool restore
dotnet cake build.cake -t "${1:-default}" "${@:2}"
8 changes: 8 additions & 0 deletions cake.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[Paths]
Addins=out/bld/addins
Cache=out/bld/cache
Tools=out/bld/tools

[Settings]
SkipVerification=true
EnableScriptCache=true
8 changes: 8 additions & 0 deletions doc/.markdownlint-cli2.jsonc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"globs": [
"**/*.md"
],
"ignores": [
"node_modules"
]
}
7 changes: 7 additions & 0 deletions doc/.markdownlint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"$schema": "https://raw.githubusercontent.com/DavidAnson/markdownlint/main/schema/markdownlint-config-schema.json",
"extends": "../.markdownlint.json",
"MD033": {
"allowed_elements": []
}
}
6 changes: 6 additions & 0 deletions doc/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
audit = false
engine-strict = true
fund = false
logs-dir = ../out/log
logs-max = 9007199254740991
save-exact = true
2 changes: 1 addition & 1 deletion doc/organization/finances.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ maximize profit. Revenue is spent strictly on the following:
1. Funding maintainers of Vezel's open source projects.
2. Sponsoring developers of third-party open source projects that Vezel's
projects depend on.
4. Operational costs for the organization (domain names, code signing, etc).
3. Operational costs for the organization (domain names, code signing, etc).

## Donations

Expand Down
Loading

0 comments on commit 3a97aa0

Please sign in to comment.