Add optional query expression cleanup. Write saner expressions by col… #485
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: dotnet build | |
| on: | |
| push: | |
| branches: [ main ] | |
| paths: | |
| - '**.cs' | |
| - '**.csproj' | |
| - '**.yml' | |
| pull_request: | |
| paths: | |
| - '**.cs' | |
| - '**.csproj' | |
| - '**.yml' | |
| workflow_dispatch: | |
| env: | |
| REPODB_MYSQL_CONSTR_SYS: "Server=127.0.0.1;Port=43306;Database=sys;User ID=root;Password=ddd53e85-b15e-4da8-91e5-a7d3b00a0ab2;" | |
| REPODB_ORACLE_CONSTR_MASTER: "Data Source=127.0.0.1:41521/APPDB;User Id=system;Password=ddd53e85-b15e-4da8;" | |
| REPODB_POSTGRESQL_CONSTR_POSTGRESDB: "Server=127.0.0.1;Port=45432;Database=postgres;User Id=postgres;Password=ddd53e85-b15e-4da8-91e5-a7d3b00a0ab2;" | |
| REPODB_SQLSERVER_CONSTR_MASTER: "Server=tcp:127.0.0.1,41433;Database=master;User ID=sa;Password=ddd53e85-b15e-4da8-91e5-a7d3b00a0ab2;TrustServerCertificate=True;" | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| # Services. See docker-compose.yml | |
| services: | |
| mysql: | |
| image: mysql:latest | |
| ports: | |
| - 127.0.0.1:43306:3306 | |
| env: | |
| MYSQL_ROOT_PASSWORD: ddd53e85-b15e-4da8-91e5-a7d3b00a0ab2 | |
| oracle: | |
| image: gvenzl/oracle-free:slim-faststart | |
| ports: | |
| - 127.0.0.1:41521:1521 | |
| - 127.0.0.1:45500:5500 | |
| env: | |
| ORACLE_PASSWORD: ddd53e85-b15e-4da8 | |
| ORACLE_ALLOW_REMOTE: true | |
| ORACLE_DISABLE_APEX: true | |
| ORACLE_DISABLE_JSON: true | |
| ORACLE_SGA_TARGET: 512 | |
| ORACLE_PGA_AGGREGATE_TARGET: 256 | |
| postgresql: | |
| image: pgvector/pgvector:pg18 | |
| ports: | |
| - 127.0.0.1:45432:5432 | |
| env: | |
| POSTGRES_PASSWORD: ddd53e85-b15e-4da8-91e5-a7d3b00a0ab2 | |
| sqlserver: | |
| image: mcr.microsoft.com/mssql/server:2025-latest | |
| ports: | |
| - 127.0.0.1:41433:1433 | |
| env: | |
| ACCEPT_EULA: true | |
| MSSQL_SA_PASSWORD: ddd53e85-b15e-4da8-91e5-a7d3b00a0ab2 | |
| steps: | |
| - name: Check out repository code | |
| uses: actions/checkout@v6 | |
| - name: Setup DotNet Versions | |
| uses: actions/setup-dotnet@v5 | |
| with: | |
| dotnet-version: | | |
| 8.0.x | |
| 9.0.x | |
| 10.0.x | |
| - name: Add coverage support | |
| run: | | |
| dotnet tool install -g dotnet-coverage | |
| dotnet tool install -g dotnet-reportgenerator-globaltool | |
| - name: restore | |
| run: dotnet restore | |
| - name: Set version variables | |
| id: version | |
| run: | | |
| COMMIT_DATE=$(git log -1 --format='%ai' | cut -d' ' -f1) | |
| DATE=$(echo $COMMIT_DATE | awk -F'-' '{print $1"."$2$3}') | |
| BUILD_NUM=$(printf "%d" $(( ${{ github.run_number }} % 60000 ))) | |
| echo "version=1.${DATE}.${BUILD_NUM}" >> $GITHUB_OUTPUT | |
| - name: build | |
| run: dotnet build -c Release -p:Version="${{ steps.version.outputs.version }}" -p:PackagePrefix=AmpScm. --no-restore | |
| - name: Run tests for .NET 10.0 with coverage | |
| run: | | |
| dotnet-coverage collect \ | |
| --settings src/coverage.runsettings \ | |
| --output-format cobertura \ | |
| -o coverage.xml \ | |
| -- \ | |
| dotnet test -c Release -f net10.0 --no-build \ | |
| --report-github --report-github-summary-include-passed=false | |
| - name: Pack packages | |
| run: dotnet pack -c Release -p:Version="${{ steps.version.outputs.version }}" -p:PackagePrefix=AmpScm. -o release | |
| - name: Package nupkg files | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: release | |
| path: release/*nupkg | |
| - name: Generate coverage report | |
| run: | | |
| reportgenerator \ | |
| -reports:coverage.xml \ | |
| -targetdir:coverage-report \ | |
| -reporttypes:MarkdownSummaryGithub | |
| - name: Add HTML summary to GitHub Action output | |
| run: | | |
| cat coverage-report/SummaryGithub.md >> $GITHUB_STEP_SUMMARY |