From ba7d4eb5b33642f8b852e05834168f28dbde7cb8 Mon Sep 17 00:00:00 2001 From: ilia Date: Sat, 13 Dec 2025 23:00:58 -0500 Subject: [PATCH] Add CI workflow with markdown linting and self-hosted runner job --- .gitea/workflows/ci.yml | 44 +++++++++++++++++++++++++++++++++++++++++ package.json | 5 ++++- 2 files changed, 48 insertions(+), 1 deletion(-) create mode 100644 .gitea/workflows/ci.yml diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml new file mode 100644 index 0000000..5a905c6 --- /dev/null +++ b/.gitea/workflows/ci.yml @@ -0,0 +1,44 @@ +name: CI + +on: + push: + branches: [ master ] + pull_request: + +jobs: + lint-and-test: + runs-on: ubuntu-latest + container: + image: node:20-bullseye + steps: + - name: Check out code + uses: actions/checkout@v4 + + - name: Install dependencies + run: npm ci + + - name: Lint markdown + run: npm run test:markdown + + - name: Check markdown links + run: npm run test:links + + build-and-test: + runs-on: self-hosted + container: + image: node:20-bullseye + steps: + - name: Check out code + uses: actions/checkout@v4 + + - name: Install dependencies + run: npm ci + + - name: Lint + run: npm run lint + + - name: Test + run: npm test + + - name: Check formatting + run: npm run lint:format diff --git a/package.json b/package.json index 9408fa5..64e71ec 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,10 @@ "private": true, "scripts": { "test:markdown": "markdownlint-cli2 README.md 'docs/**/*.md'", - "test:links": "markdown-link-check README.md docs/**/*.md" + "test:links": "markdown-link-check README.md docs/**/*.md", + "lint": "markdownlint-cli2 README.md 'docs/**/*.md'", + "test": "npm run test:markdown && npm run test:links", + "lint:format": "markdownlint-cli2 --fix README.md 'docs/**/*.md'" }, "devDependencies": { "markdown-link-check": "^3.13.7",