Section 1 complete (tasks 1.1-1.7): - .NET 8 solution with 8 projects (Common, Basic, Database, Logic, Api, Backend, Migration, Tests) and correct dependency graph - NuGet deps: MySqlConnector, NBitcoin, Microsoft.Extensions.Hosting, xunit, coverlet - Common layer: IHasIdentity, enums (Permission, FinancialAccountType, DocumentType, CryptoChain, ExpenseClaimStatus, InvoiceStatus, PayoutStatus, FinancialDependencyType) - React + TypeScript + Vite frontend with MUI, react-router, react-i18next - Localization: EN, SV, DE translation files - Vite builds to src/UsingCash.Api/wwwroot for static serving - Multi-stage Dockerfile: Node build + .NET build -> aspnet runtime - Gitea Actions CI: build, test, lint, Docker image - appsettings.json with read/write/admin DB credential structure Also updates data-migration spec/design for mysqldump-based workflow. Made-with: Cursor
59 lines
1.4 KiB
YAML
59 lines
1.4 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [master, 'agent/*']
|
|
pull_request:
|
|
branches: [master]
|
|
|
|
jobs:
|
|
build-and-test:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Setup .NET
|
|
uses: actions/setup-dotnet@v4
|
|
with:
|
|
dotnet-version: '8.0.x'
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: '20'
|
|
cache: 'npm'
|
|
cache-dependency-path: frontend/package-lock.json
|
|
|
|
- name: Restore .NET dependencies
|
|
run: dotnet restore src/UsingCash.sln
|
|
|
|
- name: Build .NET
|
|
run: dotnet build src/UsingCash.sln --no-restore -c Release
|
|
|
|
- name: Run .NET tests
|
|
run: dotnet test src/UsingCash.sln --no-build -c Release --verbosity normal
|
|
|
|
- name: Install frontend dependencies
|
|
run: npm ci
|
|
working-directory: frontend
|
|
|
|
- name: Lint frontend
|
|
run: npm run lint
|
|
working-directory: frontend
|
|
|
|
- name: Build frontend
|
|
run: npm run build
|
|
working-directory: frontend
|
|
|
|
docker:
|
|
needs: build-and-test
|
|
runs-on: ubuntu-latest
|
|
if: github.ref == 'refs/heads/master'
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Build Docker image
|
|
run: docker build -t using-cash:${{ github.sha }} -t using-cash:latest .
|
|
|
|
# Push to registry can be added when a registry is configured
|