Skip to content

Add Nimblesite.Reporting platform MVP (engine, API, React renderer, E2E tests) #98

Add Nimblesite.Reporting platform MVP (engine, API, React renderer, E2E tests)

Add Nimblesite.Reporting platform MVP (engine, API, React renderer, E2E tests) #98

Workflow file for this run

name: CI
on:
pull_request:
branches: [main]
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
DOTNET_VERSION: '9.0.x'
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
DOTNET_CLI_TELEMETRY_OPTOUT: true
jobs:
# Track 1: Format Check All -> Lint All -> DataProvider Tests
lint-and-dataprovider:
name: Lint + DataProvider Tests
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ env.DOTNET_VERSION }}
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Cache NuGet packages
uses: actions/cache@v4
with:
path: ~/.nuget/packages
key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj', '**/*.fsproj') }}
restore-keys: |
${{ runner.os }}-nuget-
- name: Cache Cargo registry
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
Lql/lql-lsp-rust/target
key: ${{ runner.os }}-cargo-lint-${{ hashFiles('Lql/lql-lsp-rust/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-lint-
${{ runner.os }}-cargo-
- name: Restore .NET tools
run: dotnet tool restore
- name: Install Node dependencies (LQL Extension)
run: cd Lql/LqlExtension && npm install --no-audit --no-fund
- name: Format check
run: make fmt-check
- name: Lint
run: make lint
- name: Build CLI tools (needed by F# Type Provider MSBuild targets)
run: |
dotnet build Migration/Nimblesite.DataProvider.Migration.Cli -c Debug
dotnet build DataProvider/Nimblesite.DataProvider.SQLite.Cli -c Debug
- name: Test DataProvider (with coverage enforcement)
run: >-
make _test_dotnet DOTNET_TEST_PROJECTS="DataProvider/Nimblesite.DataProvider.Tests
DataProvider/Nimblesite.DataProvider.Example.Tests"
- name: Upload test results
uses: actions/upload-artifact@v4
if: always()
with:
name: test-results-dataprovider
path: '**/TestResults/*.trx'
# Track 2: Build All -> LQL Tests -> Migration Tests -> Sync Tests
build-and-test:
name: Build + LQL / Migration / Sync Tests
runs-on: ubuntu-latest
timeout-minutes: 15
services:
postgres:
image: postgres:16
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: changeme
POSTGRES_DB: postgres
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
env:
DOTNET_CLI_DO_NOT_USE_MSBUILD_SERVER: 1
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ env.DOTNET_VERSION }}
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Install cargo-tarpaulin
run: cargo install cargo-tarpaulin
- name: Cache NuGet packages
uses: actions/cache@v4
with:
path: ~/.nuget/packages
key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj', '**/*.fsproj') }}
restore-keys: |
${{ runner.os }}-nuget-
- name: Cache Cargo registry + build
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
Lql/lql-lsp-rust/target
key: ${{ runner.os }}-cargo-build-${{ hashFiles('Lql/lql-lsp-rust/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-build-
${{ runner.os }}-cargo-
- name: Build .NET
run: dotnet build DataProvider.sln -c Debug
- name: Build Rust
run: cd Lql/lql-lsp-rust && cargo build
- name: Test LQL + Migration + Sync (with coverage enforcement)
run: >-
make _test_dotnet DOTNET_TEST_PROJECTS="Lql/Nimblesite.Lql.Tests
Lql/Nimblesite.Lql.TypeProvider.FSharp.Tests
Migration/Nimblesite.DataProvider.Migration.Tests
Sync/Nimblesite.Sync.Tests
Sync/Nimblesite.Sync.SQLite.Tests
Sync/Nimblesite.Sync.Postgres.Tests
Sync/Nimblesite.Sync.Integration.Tests
Sync/Nimblesite.Sync.Http.Tests"
env:
TESTCONTAINERS_RYUK_DISABLED: false
- name: Test LQL Rust (with coverage enforcement)
run: make _test_rust
- name: Upload test results
uses: actions/upload-artifact@v4
if: always()
with:
name: test-results-build
path: '**/TestResults/*.trx'
# Track 3: Build All -> LQL Extension Tests
extension-tests:
name: LQL Extension Tests
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install dependencies
run: cd Lql/LqlExtension && npm install --no-audit --no-fund
- name: Test Extension (with coverage enforcement)
run: make _test_ts
- name: Package VSIX (dry run)
run: cd Lql/LqlExtension && npm run compile && npx vsce package --no-git-tag-version --no-update-package-json