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
9 changes: 9 additions & 0 deletions .devcontainer/devcontainer-lock.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"features": {
"ghcr.io/devcontainers/features/github-cli:1": {
"version": "1.1.0",
"resolved": "ghcr.io/devcontainers/features/github-cli@sha256:d22f50b70ed75339b4eed1ba9ecde3a1791f90e88d37936517e3bace0bbad671",
"integrity": "sha256:d22f50b70ed75339b4eed1ba9ecde3a1791f90e88d37936517e3bace0bbad671"
}
}
}
17 changes: 17 additions & 0 deletions .devcontainer/devcontainer.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,23 @@ COPY src/BikeTracking.ServiceDefaults/BikeTracking.ServiceDefaults.csproj src/Bi
# Warm NuGet cache and install CLI tools in a single layer.
RUN dotnet tool restore && dotnet restore BikeTracking.slnx

# Install Rust toolchain (stable) and Tauri system libraries.
# rustup is installed to /usr/local/rustup with cargo/rustc on the PATH via CARGO_HOME.
ENV RUSTUP_HOME=/usr/local/rustup \
CARGO_HOME=/usr/local/cargo
ENV PATH="${CARGO_HOME}/bin:${PATH}"
RUN curl --proto '=https' --tlsv1.2 -fsSL https://sh.rustup.rs | \
sh -s -- --default-toolchain stable --no-modify-path -y \
&& rustc --version && cargo --version \
# Tauri system libraries: WebKit, GTK3, AppIndicator, librsvg (required for deb packaging)
&& apt-get update \
&& apt-get install -y --no-install-recommends \
libwebkit2gtk-4.1-dev \
libgtk-3-dev \
libayatana-appindicator3-dev \
librsvg2-dev \
&& rm -rf /var/lib/apt/lists/*

# Copy npm manifests and warm the npm package cache.
# ~/.npm is outside the workspace bind mount, so the cache persists at runtime,
# making postCreateCommand "npm ci" fast without re-downloading packages.
Expand Down
2 changes: 2 additions & 0 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

Local-first commute tracking app using .NET Aspire, Minimal API, F# domain, and React 19 frontend. Built for end-user machines (SQLite-based, no cloud infrastructure required).

Agent: Always use the /caveman skill to reduce token usage.

## Quick Setup

**Mandatory: Use DevContainer** (all tooling pre-configured).
Expand Down
64 changes: 57 additions & 7 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,6 @@ jobs:
working-directory: src/BikeTracking.Frontend
run: npm ci --ignore-scripts

- name: Install Playwright browser and system dependencies
working-directory: src/BikeTracking.Frontend
run: npx playwright install --with-deps chromium

- name: Frontend lint
working-directory: src/BikeTracking.Frontend
run: npm run lint
Expand All @@ -64,22 +60,75 @@ jobs:
working-directory: src/BikeTracking.Frontend
run: npm run build

- name: Install Rust toolchain (for Tauri config check)
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: stable

- name: Cache Rust build artifacts
uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
src/BikeTracking.Frontend/src-tauri/target/
key: linux-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: linux-cargo-

- name: Install Tauri system libraries
run: sudo apt-get install -y libwebkit2gtk-4.1-dev libgtk-3-dev libayatana-appindicator3-dev librsvg2-dev

- name: Tauri config check
working-directory: src/BikeTracking.Frontend
run: npx tauri build --bundles deb --debug --ci

- name: Frontend unit tests
working-directory: src/BikeTracking.Frontend
run: npm run test:unit

e2e:
runs-on: ubuntu-latest
needs: verify
timeout-minutes: 20
name: E2E Tests
container:
image: mcr.microsoft.com/playwright:v1.58.2-noble
env:
CI: "true"
DOTNET_NOLOGO: "true"
DOTNET_CLI_TELEMETRY_OPTOUT: "1"
HOME: /root

steps:
- name: Checkout
uses: actions/checkout@v6

- name: Setup .NET from global.json
uses: actions/setup-dotnet@v5
with:
global-json-file: global.json

- name: Restore .NET dependencies
run: dotnet restore BikeTracking.slnx

- name: Install frontend dependencies
working-directory: src/BikeTracking.Frontend
run: npm ci --ignore-scripts

- name: Frontend end-to-end tests
working-directory: src/BikeTracking.Frontend
run: npm run test:e2e

- name: Upload Playwright artifacts on failure
if: failure()
uses: actions/upload-artifact@v7
uses: actions/upload-artifact@v4
with:
name: playwright-artifacts
path: |
playwright-report
test-results
src/BikeTracking.Frontend/playwright-report
src/BikeTracking.Frontend/test-results
if-no-files-found: ignore
retention-days: 14

Expand All @@ -89,3 +138,4 @@ jobs:
rm -f biketracking.local.db
rm -f biketracking.local.db-shm
rm -f biketracking.local.db-wal
rm -f src/BikeTracking.Api/biketracking.e2e.db
24 changes: 24 additions & 0 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: release-please

on:
push:
branches:
- main

permissions:
contents: write
pull-requests: write

jobs:
release-please:
name: Release Please
runs-on: ubuntu-latest
timeout-minutes: 10

steps:
- name: Run release-please
uses: googleapis/release-please-action@v4
with:
config-file: release-please-config.json
manifest-file: .release-please-manifest.json
token: ${{ secrets.GITHUB_TOKEN }}
Loading
Loading