Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions .github/CICD.md
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,27 @@ This will:

The `build:rn` script automatically handles cleaning, so no need to run `clean-rn-assets` separately.

## ODE Desktop (Tauri)

**Workflow file**: `.github/workflows/ode-desktop.yml`

### Triggers

- **Pull requests** and **pushes** to `main` / `dev` when files under `desktop/**` change (or the workflow file itself)
- **Manual dispatch**

### Path filters

Runs only when `desktop/**` or `.github/workflows/ode-desktop.yml` changes.

### What it runs

From `desktop/`: `pnpm lint`, `pnpm format:check`, `pnpm test`, `pnpm typecheck`, `pnpm codegen:synk-client`, then **fails** if `desktop/src/generated` drifts from the regenerated OpenAPI client. From `desktop/src-tauri/`: `cargo fmt --check`, `cargo clippy -D warnings`, `cargo test`.

### Formplayer embed

After building formplayer (`npm run build` in `formulus-formplayer`), copy its `build/` into the desktop app with `pnpm copy:formplayer` from `desktop/` (see `desktop/README.md`). Copied assets are gitignored under `desktop/public/formplayer_dist/`.

## Future Enhancements

Potential improvements to the CI/CD pipeline:
Expand Down
102 changes: 102 additions & 0 deletions .github/workflows/ode-desktop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
name: ODE Desktop

on:
pull_request:
paths:
- 'desktop/**'
- '.github/workflows/ode-desktop.yml'
push:
branches:
- main
- dev
paths:
- 'desktop/**'
- '.github/workflows/ode-desktop.yml'
workflow_dispatch:

env:
NODE_VERSION: '24'

jobs:
desktop:
name: Lint, test, and Rust checks
runs-on: ubuntu-latest
defaults:
run:
working-directory: desktop

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}

- name: Enable corepack and install pnpm
run: |
corepack enable
corepack prepare pnpm@latest --activate

- name: Get pnpm store directory
id: pnpm-cache
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path $(pnpm --version))" >> $GITHUB_OUTPUT

- name: Setup pnpm cache
uses: actions/cache@v3
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-

- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: ESLint
run: pnpm lint

- name: Prettier
run: pnpm format:check

- name: Vitest
run: pnpm test

- name: Typecheck
run: pnpm typecheck

- name: Regenerate Synkronus TypeScript client
run: pnpm codegen:synk-client

- name: Verify generated client matches repository
working-directory: ${{ github.workspace }}
run: git diff --exit-code -- desktop/src/generated

- name: Install Linux dependencies (Tauri prerequisites)
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y \
libglib2.0-dev \
libgtk-3-dev \
libwebkit2gtk-4.1-dev \
libappindicator3-dev \
librsvg2-dev \
patchelf \
libssl-dev \
pkg-config

- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy

- name: Cargo fmt, clippy, test
working-directory: desktop/src-tauri
run: |
cargo fmt --check
cargo clippy -- -D warnings
cargo test
4 changes: 2 additions & 2 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ ODE is a **clearinghouse** model: data is collected on devices, synchronized thr
- **Synkronus** β€” Go backend: auth, sync, app bundle distribution, export, shared HTTP API.
- **Synkronus Portal** β€” Web admin UI (React + Vite): same API as other clients; no privileged backend channel.
- **Synkronus CLI** β€” `synk` command-line client: automation, bundles, sync, export.
- **ODE Desktop** β€” Tauri app: **Data management** + **Forms / app workbench**; source in [`desktop/`](desktop/). See [ROADMAP.md](ROADMAP.md).

```mermaid
flowchart LR
Expand Down Expand Up @@ -77,8 +78,7 @@ Do not assume custom app authors have local checkouts of **ODE** or internal exa

Do **not** implement or assume APIs for these as if they were in-repo unless issues/specs say otherwise:

- **ODE Custodian** β€” local data stewardship and correction workflows (roadmap; often CLI-first).
- **ODE Workshop** β€” desktop dev environment for bundles/forms (roadmap).
- **ODE Desktop** β€” Tauri app: **Data management** and **Forms / app workbench** in one shell; see [ROADMAP.md](ROADMAP.md).

See [product roadmap context](https://opendataensemble.org/docs/) and organization roadmaps on [GitHub](https://github.com/OpenDataEnsemble).

Expand Down
Loading
Loading