From 7f2ad57d1a470af86c26a275d1f3771a6cef6060 Mon Sep 17 00:00:00 2001 From: Roman Priesol Date: Thu, 27 Aug 2026 14:03:37 +0200 Subject: [PATCH] Add a Gitea Actions CI workflow Ruby syntax check, a require_relative "app" smoke load, and JS syntax check on every push/PR. No test suite exists yet, so these are cheap syntax/load checks rather than behavioral tests. --- .gitea/workflows/ci.yml | 29 +++++++++++++++++++++++++++++ docs/development.adoc | 8 ++++++++ 2 files changed, 37 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..acebfa6 --- /dev/null +++ b/.gitea/workflows/ci.yml @@ -0,0 +1,29 @@ +name: CI + +on: + push: + pull_request: + +jobs: + check: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: ruby/setup-ruby@v1 + with: + ruby-version: file # reads .ruby-version + bundler-cache: true + + - name: Ruby syntax check + run: find app.rb config lib -name "*.rb" -print0 | xargs -0 -n1 ruby -c + + - name: App loads without errors + run: bundle exec ruby -e 'require_relative "app"' + + - uses: actions/setup-node@v4 + with: + node-version: "22" + + - name: JS syntax check + run: find public/js -name "*.js" -print0 | xargs -0 -n1 node --check diff --git a/docs/development.adoc b/docs/development.adoc index c802ddd..d21cd58 100644 --- a/docs/development.adoc +++ b/docs/development.adoc @@ -90,3 +90,11 @@ gpsd -N -n tcp://127.0.0.1:5001 `GET /api/gnss/position` should then report the fake fix (Bratislava Castle, in the sentences above) within a couple of seconds. + +== Continuous integration + +`.gitea/workflows/ci.yml` runs on every push/PR against a self-hosted +Gitea Actions runner: `ruby -c` on every `.rb` file, a `require_relative +"app"` smoke check that the app loads without error, and `node --check` +on every file under `public/js/`. There is no test suite yet — these +are cheap syntax/load checks, not behavioral tests.