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.
This commit is contained in:
1 parent
0887ccbfe7
commit
7f2ad57d1a
2 files changed
+37
No files matched your search
@@ -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
|
||||||
@@ -90,3 +90,11 @@ gpsd -N -n tcp://127.0.0.1:5001
|
|||||||
|
|
||||||
`GET /api/gnss/position` should then report the fake fix (Bratislava
|
`GET /api/gnss/position` should then report the fake fix (Bratislava
|
||||||
Castle, in the sentences above) within a couple of seconds.
|
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.
|
||||||
Reference in new issue
Block a user