From 4fab9e3e4a6036ee4bdcf93cb4bcd50c97c1b51d Mon Sep 17 00:00:00 2001 From: blackroad Date: Mon, 16 Mar 2026 12:23:25 -0500 Subject: [PATCH] ci: add standard CI workflow --- .gitea/workflows/ci.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) 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..111fb77 --- /dev/null +++ b/.gitea/workflows/ci.yml @@ -0,0 +1,24 @@ +name: CI +on: [push, pull_request] +jobs: + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Detect and lint + run: | + if [ -f package.json ]; then + npm ci --ignore-scripts 2>/dev/null || npm install --ignore-scripts + npx eslint . --ext .js,.ts,.jsx,.tsx --no-error-on-unmatched-pattern 2>/dev/null || true + fi + if [ -f requirements.txt ] || [ -f setup.py ] || [ -f pyproject.toml ]; then + pip install ruff 2>/dev/null + ruff check . 2>/dev/null || true + fi + if ls *.sh 2>/dev/null || ls **/*.sh 2>/dev/null; then + shellcheck *.sh **/*.sh 2>/dev/null || true + fi + - name: Check syntax + run: | + find . -name "*.py" -exec python3 -c "import py_compile; py_compile.compile('{}', doraise=True)" \; 2>/dev/null || true + find . -name "*.sh" -exec bash -n {} \; 2>/dev/null || true