testing ci using external forgejo runner #84

Merged
zach merged 21 commits from forgejo-workflows into main 2026-05-16 01:26:00 +02:00
6 changed files with 140 additions and 0 deletions
+26
View File
@@ -0,0 +1,26 @@
name: Format (JS/TS)
on:
pull_request:
jobs:
format:
runs-on: alpine
container: node:20-alpine
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install tools
run: |
apk add --no-cache \
git
- name: Prettier
run: |
if [ -n "$(find . \( -iname "*.js" -o -iname "*.jsx" -o -iname "*.ts" -o -iname "*.tsx" -o -iname "*.mjs" -o -iname "*.cjs" \) -print -quit)" ]; then
npx --yes prettier --check "**/*.{js,jsx,ts,tsx,mjs,cjs}" --ignore-path .gitignore
else
echo "No JS/TS files found"
fi
+33
View File
@@ -0,0 +1,33 @@
name: Lint (JS/TS)
on:
pull_request:
jobs:
lint:
runs-on: alpine
container: node:20-alpine
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install tools
run: |
apk add --no-cache \
git
- name: ESLint
run: |
if [ -n "$(find . \( -iname "*.js" -o -iname "*.jsx" -o -iname "*.ts" -o -iname "*.tsx" -o -iname "*.mjs" -o -iname "*.cjs" \) -print -quit)" ]; then
if [ -f package.json ]; then
npm install --no-audit --no-fund
fi
if [ -f eslint.config.js ] || [ -f eslint.config.mjs ] || [ -f eslint.config.cjs ] || [ -f .eslintrc ] || [ -f .eslintrc.js ] || [ -f .eslintrc.cjs ] || [ -f .eslintrc.json ] || [ -f .eslintrc.yaml ] || [ -f .eslintrc.yml ]; then
npx --yes eslint .
else
echo "No eslint config found"
fi
else
echo "No JS/TS files found"
fi
+27
View File
@@ -0,0 +1,27 @@
name: Lint (Python)
on:
pull_request:
jobs:
lint:
runs-on: alpine
container: node:20-alpine
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install tools
run: |
apk add --no-cache \
git \
python3 \
py3-pip
- name: Ruff
run: |
python3 -m venv .venv
. .venv/bin/activate
pip install --no-cache-dir ruff
ruff check .
+27
View File
@@ -0,0 +1,27 @@
name: Lint (Rust)
on:
pull_request:
jobs:
lint:
runs-on: alpine
container: node:20-alpine
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install tools
run: |
apk add --no-cache \
git \
rust
- name: Rustfmt
run: |
if [ -f Cargo.toml ]; then
cargo fmt --check
else
echo "No Rust project found"
fi
+13
View File
@@ -0,0 +1,13 @@
{
"semi": true,
"singleQuote": true,
"jsxSingleQuote": false,
"tabWidth": 4,
"printWidth": 100,
"trailingComma": "es5",
"bracketSpacing": true,
"bracketSameLine": false,
"arrowParens": "always",
"endOfLine": "lf",
"proseWrap": "preserve"
}
+14
View File
@@ -0,0 +1,14 @@
export default [
{
files: ["**/*.{js,jsx,ts,tsx,mjs,cjs}"],
languageOptions: {
ecmaVersion: 2021,
sourceType: "module"
},
linterOptions: {
reportUnusedDisableDirectives: true
},
rules: {
}
}
];