ci: Gitea Actions test pipeline (v0.1.2) #4

Merged
kamilkrzywda merged 1 commits from ci/test-pipeline into main 2026-09-23 21:53:58 +02:00
3 changed files with 74 additions and 1 deletions
Showing only changes of commit 6837392d8b - Show all commits
+69
View File
@@ -0,0 +1,69 @@
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
jobs:
ci:
name: build + unit
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
# The runner provides a working docker CLI out of the box (full-dind) — no endpoint
# resolution needed, same as flight's CI.
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 22
# Job-level dep cache via the runner's built-in cache server. continue-on-error: an
# unreachable/broken cache server must never break the run (flight convention). npm ci
# wipes node_modules, so cache npm's own tarball store instead — restoring node_modules
# would just be deleted again. No explicit save step: caches marked by the restore step
# are uploaded automatically at job end.
- name: Restore deps cache
uses: actions/cache@v4
continue-on-error: true
with:
path: $HOME/.npm
key: ${{ runner.os }}-deps-npm-${{ hashFiles('package-lock.json') }}
# Retried: the runner's outbound network/DNS is flaky (transient EAI_AGAIN seen in CI).
- name: Install dependencies
run: |
set -u
ok=0
for i in 1 2 3; do
if npm ci; then ok=1; break; fi
echo "::warning::dependency install attempt $i/3 failed (likely transient network) — retrying in 5s" >&2
sleep 5
done
[ "$ok" = "1" ] || { echo "::error::dependency install failed after 3 attempts" >&2; exit 1; }
- name: Build
run: npm run build
# vitest auto-appends results to $GITHUB_STEP_SUMMARY when GITHUB_ACTIONS=true — no
# extra summary step needed (same as flight relies on for its unit stage).
- name: Unit tests
run: npm test
# Verifies the production Dockerfile builds — the deploy path is `docker compose up -d --build`.
# Build only, nothing runs, so no cleanup/prune steps are needed (unlike flight's e2e stack).
# Retried: same flaky runner network as dep install.
- name: Docker image build
run: |
set -u
ok=0
for i in 1 2 3; do
if docker compose build --progress=plain; then ok=1; break; fi
echo "::warning::docker build attempt $i/3 failed (likely transient network) — retrying in 5s" >&2
sleep 5
done
[ "$ok" = "1" ] || { echo "::error::docker image build failed after 3 attempts" >&2; exit 1; }
+4
View File
@@ -1,5 +1,9 @@
# Changelog
## v0.1.2 — 2026-09-23 19:51
- Added a Gitea Actions CI pipeline (`.gitea/workflows/ci.yml`), mirroring flight's runner conventions: on push/PR to `main` (plus manual dispatch) one job runs `npm ci`, `nest build`, the vitest unit suite, and a production Docker image build — with retry loops for the runner's flaky uplink. No app code changed.
## v0.1.1 — 2026-09-23 19:38
- Fixed the default bridge port to `4403`, the meshtastic-serial-bridge's actual TCP port (the old value pointed at a closed port). Updated the `MESH_PORT` default in code, the docker-compose environment, and docs.
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "mesh-bot",
"version": "0.1.1",
"version": "0.1.2",
"description": "",
"author": "",
"private": true,