Some checks are pending
CI / Integration (mcr.microsoft.com/mssql/server:2019-latest) (push) Blocked by required conditions
CI / Integration (mcr.microsoft.com/mssql/server:2022-latest) (push) Blocked by required conditions
CI / Build og unit tests (push) Waiting to run
CI / MSI-installer (push) Blocked by required conditions
CI / Integration (mcr.microsoft.com/mssql/server:2017-latest) (push) Blocked by required conditions
CI / Integration (mcr.microsoft.com/mssql/server:2025-latest) (push) Blocked by required conditions
installer/SQLInsight.wxs (WiX 3 syntax) builds on Linux with wixl (installer/build-msi.sh) and in Forgejo CI on every v* tag. Agent and Web are installed self-contained as Windows services under virtual service accounts (or a gMSA), with a settings page in the wizard or MSI properties for silent installs; the values go to sqlinsight.ini, read after appsettings.json. The data folder is locked to SYSTEM, Administrators and the agent account, the event log source is registered, the web port is opened in the firewall, and the automatic update task is an optional feature. Upgrades happen in place, keep edited settings and the chosen features; uninstall keeps the settings. msi-tables.py writes what wixl lacks (component and feature conditions, Permanent/NeverOverwrite, vital services, REG_EXPAND_SZ) and verify-msi.py checks the result (sequencing, deferred actions, ASCII only). test-msi-wine.sh runs install, upgrade and uninstall under Wine. Installations made with the MSI get new versions as MSI packages run by the update task, so Windows Installer stays in charge of the files. The example instance is removed from the shipped appsettings.json, and the CLI writes UTF-8 to the console. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01E3EExwndy8Z22EK2Qpt6BK
86 lines
3.2 KiB
YAML
86 lines
3.2 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
tags: ["v*"]
|
|
pull_request:
|
|
|
|
env:
|
|
DOTNET_CLI_TELEMETRY_OPTOUT: "1"
|
|
DOTNET_NOLOGO: "1"
|
|
|
|
jobs:
|
|
build:
|
|
name: Build og unit tests
|
|
# "docker" er standard-label for en Forgejo runner. Ret til jeres runners label, hvis det er et andet.
|
|
runs-on: docker
|
|
container:
|
|
image: mcr.microsoft.com/dotnet/sdk:10.0
|
|
steps:
|
|
- name: Checkout
|
|
run: |
|
|
git init -q .
|
|
git remote add origin "${{ github.server_url }}/${{ github.repository }}.git"
|
|
git -c http.extraHeader="Authorization: token ${{ secrets.GITHUB_TOKEN }}" fetch -q --depth 1 origin "${{ github.sha }}"
|
|
git checkout -q FETCH_HEAD
|
|
- name: Restore
|
|
run: dotnet restore
|
|
- name: Build
|
|
run: dotnet build --no-restore --configuration Release
|
|
- name: Unit tests
|
|
run: dotnet test --no-build --configuration Release --filter "Category!=Integration"
|
|
|
|
msi:
|
|
name: MSI-installer
|
|
needs: build
|
|
runs-on: docker
|
|
container:
|
|
image: mcr.microsoft.com/dotnet/sdk:10.0
|
|
steps:
|
|
- name: Checkout
|
|
run: |
|
|
git init -q .
|
|
git remote add origin "${{ github.server_url }}/${{ github.repository }}.git"
|
|
git -c http.extraHeader="Authorization: token ${{ secrets.GITHUB_TOKEN }}" fetch -q --depth 1 origin "${{ github.sha }}"
|
|
git checkout -q FETCH_HEAD
|
|
- name: Værktøjer (wixl, msitools; nodejs til upload-artifact)
|
|
run: apt-get update -q && apt-get install -y -q --no-install-recommends wixl msitools python3 nodejs
|
|
- name: Byg og kontrollér MSI
|
|
# Et tag som v1.2.0 giver version 1.2.0; ellers versionen fra Directory.Build.props.
|
|
run: |
|
|
version="${GITHUB_REF_NAME#v}"
|
|
case "$GITHUB_REF" in refs/tags/v*) ;; *) version=$(sed -n 's|.*<Version>\(.*\)</Version>.*|\1|p' Directory.Build.props) ;; esac
|
|
installer/build-msi.sh "$version"
|
|
- name: Gem MSI
|
|
uses: https://code.forgejo.org/actions/upload-artifact@v3
|
|
with:
|
|
name: SQLInsight-Pro-msi
|
|
path: dist/*.msi
|
|
|
|
integration:
|
|
name: Integration (${{ matrix.image }})
|
|
needs: build
|
|
# Kræver en runner, der har adgang til Docker (Testcontainers starter SQL Server-containere).
|
|
# Slå til ved at sætte repo-variablen RUN_INTEGRATION_TESTS=true og give runneren labelen "docker-host".
|
|
if: ${{ vars.RUN_INTEGRATION_TESTS == 'true' }}
|
|
runs-on: docker-host
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
image:
|
|
- mcr.microsoft.com/mssql/server:2017-latest
|
|
- mcr.microsoft.com/mssql/server:2019-latest
|
|
- mcr.microsoft.com/mssql/server:2022-latest
|
|
- mcr.microsoft.com/mssql/server:2025-latest
|
|
env:
|
|
SQLINSIGHT_MSSQL_IMAGE: ${{ matrix.image }}
|
|
steps:
|
|
- name: Checkout
|
|
run: |
|
|
git init -q .
|
|
git remote add origin "${{ github.server_url }}/${{ github.repository }}.git"
|
|
git -c http.extraHeader="Authorization: token ${{ secrets.GITHUB_TOKEN }}" fetch -q --depth 1 origin "${{ github.sha }}"
|
|
git checkout -q FETCH_HEAD
|
|
- name: Integration tests
|
|
run: dotnet test tests/SQLInsight.IntegrationTests --configuration Release
|