Add CI workflow with markdown linting and self-hosted runner job
This commit is contained in:
parent
097fb33abc
commit
ba7d4eb5b3
44
.gitea/workflows/ci.yml
Normal file
44
.gitea/workflows/ci.yml
Normal file
@ -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
|
||||
@ -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",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user