Skip to content

Commit

Permalink
Merge branch 'develop' into frank/ollama-module
Browse files Browse the repository at this point in the history
  • Loading branch information
HofmeisterAn authored Feb 24, 2024
2 parents ad1e944 + 8aee376 commit 6a0f096
Show file tree
Hide file tree
Showing 138 changed files with 915 additions and 485 deletions.
61 changes: 41 additions & 20 deletions .github/workflows/cicd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,22 +35,36 @@ jobs:

steps:
- name: Checkout Repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
lfs: true

- name: Cache NuGet Packages
uses: actions/cache@v3
uses: actions/cache@v4
with:
key: ${{ matrix.os }}-nuget-${{ hashFiles('Directory.Build.props') }}
key: ${{ matrix.os }}-nuget-${{ hashFiles('Directory.Packages.props') }}
path: ~/.nuget/packages

# Our modules occupy too much disk space. The GitHub-hosted runners ran into the
# error: "no space left on device." The pulled images are not cleaned up between
# the test runs. One obvious approach is splitting the tests and running them on
# multiple runners. However, we need to keep in mind that running too many
# simultaneous builds has an impact on others as well. We observed that scheduled
# Dependabot builds blocked others in the Testcontainers organization.
- name: Free Disk Space
run: Remove-Item -Recurse -Force '/usr/local/lib/android' -ErrorAction SilentlyContinue # TODO: Split module tests across multiple runners (the Docker images require too much disk space)
shell: pwsh
uses: jlumbroso/[email protected]
if: runner.os == 'Linux'
with:
tool-cache: true
android: true
dotnet: true
haskell: true
large-packages: true
docker-images: true
swap-storage: false

- name: Setup .NET
uses: actions/setup-dotnet@v3
uses: actions/setup-dotnet@v4

- name: Restore .NET Tools
run: dotnet tool restore
Expand All @@ -64,8 +78,18 @@ jobs:
- name: Run Tests
run: dotnet cake --target=Tests --test-filter=${{ startsWith(matrix.os, 'ubuntu') && 'FullyQualifiedName~Testcontainers' || 'DockerPlatform=Windows' }}

# The Test Reporter GH Action is not compatible with the recent
# actions/upload-artifact@v4 updates: https://github.com/dorny/test-reporter/issues/363.
- name: Upload Test And Coverage Results
uses: actions/upload-artifact@v3
if: always()
with:
name: ${{ matrix.os }}-v3
path: test-results

- name: Upload Test And Coverage Results
uses: actions/upload-artifact@v4
if: always()
with:
name: ${{ matrix.os }}
path: test-results
Expand All @@ -77,7 +101,7 @@ jobs:

environment: production

runs-on: windows-2022 # It looks like the Linux runner cannot sign the NuGet using a PFX file.
runs-on: ubuntu-22.04

permissions:
contents: write
Expand All @@ -96,19 +120,19 @@ jobs:

steps:
- name: Checkout Repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
lfs: true
fetch-depth: 0

- name: Download Test And Coverage Results (ubuntu-22.04)
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: ubuntu-22.04
path: test-results

- name: Download Test And Coverage Results (windows-2022)
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: windows-2022
path: test-results
Expand All @@ -117,24 +141,20 @@ jobs:
run: Get-ChildItem -Path 'test-results' -Filter *.xml -Recurse | Select-Object -ExpandProperty FullName | % { (Get-Content -LiteralPath $_) -Replace 'fullPath="[A-Za-z0-9:\-\/\\]+(src|tests)', 'fullPath="${{ github.workspace }}/$1' | Set-Content -LiteralPath $_ }
shell: pwsh

- name: Decode Code Signing Certificate
run: echo $CODE_SIGNING_CERTIFICATE_BASE64 | base64 --decode > code-signing-certificate.pfx
shell: bash

- name: Cache NuGet Packages
uses: actions/cache@v3
uses: actions/cache@v4
with:
key: windows-2022-nuget-${{ hashFiles('Directory.Build.props') }}
key: ubuntu-22.04-nuget-${{ hashFiles('Directory.Packages.props') }}
path: ~/.nuget/packages

- name: Setup Java
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 17

- name: Setup .NET
uses: actions/setup-dotnet@v3
uses: actions/setup-dotnet@v4

- name: Restore .NET Tools
run: dotnet tool restore
Expand All @@ -154,8 +174,9 @@ jobs:
- name: Publish NuGet Package
run: dotnet cake --target=Publish

- uses: release-drafter/release-drafter@65c5fb495d1e69aa8c08a3317bc44ff8aabe9772
# Cake sets the semVer environment variable
- uses: release-drafter/release-drafter@v6
with:
version: ${{ env.semVer }} # Cake sets the semVer environment variable
version: ${{ env.semVer }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
8 changes: 4 additions & 4 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,17 @@ jobs:

steps:
- name: Checkout Repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
lfs: true

- name: Initialize CodeQL
uses: github/codeql-action/init@v2
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}

- name: Autobuild
uses: github/codeql-action/autobuild@v2
uses: github/codeql-action/autobuild@v3

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
uses: github/codeql-action/analyze@v3
30 changes: 30 additions & 0 deletions .github/workflows/test-report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Test Report

on:
workflow_run:
workflows: ['Continuous Integration & Delivery']
types:
- completed

jobs:
report:
strategy:
fail-fast: false
matrix:
os: [ ubuntu-22.04, windows-2022 ]

runs-on: ${{ matrix.os }}

permissions:
actions: read
checks: write
contents: read

steps:
- name: Publish Test Report
uses: dorny/[email protected]
with:
artifact: ${{ matrix.os }}-v3
name: report (${{ matrix.os }})
path: '*.trx'
reporter: dotnet-trx
62 changes: 62 additions & 0 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
<?xml version="1.0" encoding="utf-8"?>
<Project>
<PropertyGroup>
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
</PropertyGroup>
<ItemGroup>
<PackageVersion Include="BouncyCastle.Cryptography" Version="2.3.0"/>
<PackageVersion Include="Docker.DotNet.X509" Version="3.125.15"/>
<PackageVersion Include="Docker.DotNet" Version="3.125.15"/>
<PackageVersion Include="Microsoft.Bcl.AsyncInterfaces" Version="6.0.0"/>
<PackageVersion Include="Microsoft.Extensions.Logging.Abstractions" Version="6.0.4"/>
<PackageVersion Include="SharpZipLib" Version="1.4.2"/>
<PackageVersion Include="SSH.NET" Version="2023.0.0"/>
<PackageVersion Include="System.Text.Json" Version="6.0.9"/>
<!-- Unit and integration test dependencies: -->
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.8.0"/>
<PackageVersion Include="coverlet.collector" Version="6.0.0"/>
<PackageVersion Include="xunit.runner.visualstudio" Version="2.5.7"/>
<PackageVersion Include="xunit" Version="2.7.0"/>
<!-- Third-party client dependencies to connect and interact with the containers: -->
<PackageVersion Include="Apache.NMS.ActiveMQ" Version="2.1.0"/>
<PackageVersion Include="ArangoDBNetStandard" Version="2.0.1"/>
<PackageVersion Include="AWSSDK.CloudWatchLogs" Version="3.7.104.14"/>
<PackageVersion Include="AWSSDK.DynamoDBv2" Version="3.7.101.42"/>
<PackageVersion Include="AWSSDK.S3" Version="3.7.103.3"/>
<PackageVersion Include="AWSSDK.SimpleNotificationService" Version="3.7.101.7"/>
<PackageVersion Include="AWSSDK.SQS" Version="3.7.100.71"/>
<PackageVersion Include="Azure.Data.Tables" Version="12.8.0"/>
<PackageVersion Include="Azure.Storage.Blobs" Version="12.17.0"/>
<PackageVersion Include="Azure.Storage.Queues" Version="12.15.0"/>
<PackageVersion Include="ClickHouse.Client" Version="6.7.1"/>
<PackageVersion Include="Confluent.Kafka" Version="2.0.2"/>
<PackageVersion Include="Consul" Version="1.6.10.9"/>
<PackageVersion Include="CouchbaseNetClient" Version="3.4.3"/>
<PackageVersion Include="Elastic.Clients.Elasticsearch" Version="8.0.5"/>
<PackageVersion Include="EventStore.Client.Grpc.Streams" Version="22.0.0"/>
<PackageVersion Include="FirebirdSql.Data.FirebirdClient" Version="10.0.0"/>
<PackageVersion Include="Google.Cloud.BigQuery.V2" Version="3.4.0"/>
<PackageVersion Include="Google.Cloud.Bigtable.Admin.V2" Version="3.7.0"/>
<PackageVersion Include="Google.Cloud.Firestore" Version="3.1.0"/>
<PackageVersion Include="Google.Cloud.PubSub.V1" Version="3.5.0"/>
<PackageVersion Include="Google.Cloud.Storage.V1" Version="4.6.0"/>
<PackageVersion Include="InfluxDB.Client" Version="4.12.0"/>
<PackageVersion Include="JanusGraph.Net" Version="1.0.0"/>
<PackageVersion Include="Keycloak.Net.Core" Version="1.0.20"/>
<PackageVersion Include="KubernetesClient" Version="10.1.4"/>
<PackageVersion Include="Microsoft.Azure.Cosmos" Version="3.32.1"/>
<PackageVersion Include="Microsoft.Azure.Kusto.Data" Version="11.3.3"/>
<PackageVersion Include="Microsoft.Data.SqlClient" Version="5.1.3"/>
<PackageVersion Include="MongoDB.Driver" Version="2.19.0"/>
<PackageVersion Include="MyCouch" Version="7.6.0"/>
<PackageVersion Include="MySqlConnector" Version="2.2.5"/>
<PackageVersion Include="NATS.Client" Version="1.0.8"/>
<PackageVersion Include="Neo4j.Driver" Version="5.5.0"/>
<PackageVersion Include="Npgsql" Version="6.0.10"/>
<PackageVersion Include="Oracle.ManagedDataAccess.Core" Version="3.21.90"/>
<PackageVersion Include="RabbitMQ.Client" Version="6.4.0"/>
<PackageVersion Include="RavenDB.Client" Version="5.4.100"/>
<PackageVersion Include="Selenium.WebDriver" Version="4.8.1"/>
<PackageVersion Include="StackExchange.Redis" Version="2.6.90"/>
</ItemGroup>
</Project>
18 changes: 0 additions & 18 deletions Packages.props

This file was deleted.

1 change: 0 additions & 1 deletion build.cake
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ Task("Tests")
NoRestore = true,
NoBuild = true,
Collectors = new[] { "XPlat Code Coverage;Format=opencover" },
Loggers = new[] { "trx" },
Filter = param.TestFilter,
ResultsDirectory = param.Paths.Directories.TestResultsDirectoryPath,
ArgumentCustomization = args => args
Expand Down
15 changes: 15 additions & 0 deletions examples/Flyway/Directory.Packages.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<Project>
<PropertyGroup>
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
</PropertyGroup>
<ItemGroup>
<!-- Unit and integration test dependencies: -->
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.8.0"/>
<PackageVersion Include="Testcontainers.PostgreSql" Version="3.7.0"/>
<PackageVersion Include="xunit.runner.visualstudio" Version="2.5.7"/>
<PackageVersion Include="xunit" Version="2.7.0"/>
<!-- Third-party client dependencies to connect and interact with the containers: -->
<PackageVersion Include="Npgsql" Version="6.0.10"/>
</ItemGroup>
</Project>
11 changes: 0 additions & 11 deletions examples/Flyway/Packages.props

This file was deleted.

7 changes: 3 additions & 4 deletions examples/Flyway/tests/Flyway.Tests/Flyway.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk">
<Sdk Name="Microsoft.Build.CentralPackageVersions" Version="2.1.3"/>
<PropertyGroup>
<TargetFrameworks>net6.0</TargetFrameworks>
<TargetFrameworks>net8.0</TargetFrameworks>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="JetBrains.Annotations"/>
<PackageReference Include="Testcontainers.PostgreSql"/>
<PackageReference Include="JetBrains.Annotations" VersionOverride="2023.3.0" PrivateAssets="All"/>
<PackageReference Include="Microsoft.NET.Test.Sdk"/>
<PackageReference Include="Testcontainers.PostgreSql"/>
<PackageReference Include="xunit.runner.visualstudio"/>
<PackageReference Include="xunit"/>
<PackageReference Include="Npgsql"/>
Expand Down
20 changes: 20 additions & 0 deletions examples/WeatherForecast/Directory.Packages.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<Project>
<PropertyGroup>
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
</PropertyGroup>
<ItemGroup>
<PackageVersion Include="Microsoft.EntityFrameworkCore.SqlServer" Version="8.0.1"/>
<PackageVersion Include="Microsoft.EntityFrameworkCore" Version="8.0.1"/>
<PackageVersion Include="Microsoft.Fast.Components.FluentUI" Version="3.5.4"/>
<!-- Unit and integration test dependencies: -->
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.8.0"/>
<PackageVersion Include="Microsoft.AspNetCore.Mvc.Testing" Version="8.0.1"/>
<PackageVersion Include="Testcontainers.SqlEdge" Version="3.7.0"/>
<PackageVersion Include="xunit.runner.visualstudio" Version="2.5.7"/>
<PackageVersion Include="xunit" Version="2.7.0"/>
<!-- Third-party client dependencies to connect and interact with the containers: -->
<PackageVersion Include="Selenium.WebDriver.ChromeDriver" Version="106.0.5249.6100"/>
<PackageVersion Include="Selenium.WebDriver" Version="4.9.1"/>
</ItemGroup>
</Project>
6 changes: 3 additions & 3 deletions examples/WeatherForecast/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build-env
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build-env
ARG CSPROJ_FILE_PATH="src/WeatherForecast/WeatherForecast.csproj"
ARG RESOURCE_REAPER_SESSION_ID="00000000-0000-0000-0000-000000000000"
LABEL "org.testcontainers.resource-reaper-session"=$RESOURCE_REAPER_SESSION_ID
Expand All @@ -8,9 +8,9 @@ COPY . .

RUN dotnet restore $CSPROJ_FILE_PATH

RUN dotnet publish $CSPROJ_FILE_PATH --configuration Release --framework net6.0 --runtime linux-x64 --self-contained false --output out /p:DebugType=None /p:DebugSymbols=false
RUN dotnet publish $CSPROJ_FILE_PATH --configuration Release --framework net8.0 --runtime linux-x64 --self-contained false --output out /p:DebugType=None /p:DebugSymbols=false

FROM mcr.microsoft.com/dotnet/aspnet:6.0
FROM mcr.microsoft.com/dotnet/aspnet:8.0
ARG RESOURCE_REAPER_SESSION_ID="00000000-0000-0000-0000-000000000000"
LABEL "org.testcontainers.resource-reaper-session"=$RESOURCE_REAPER_SESSION_ID
WORKDIR /app
Expand Down
18 changes: 0 additions & 18 deletions examples/WeatherForecast/Packages.props

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">
<Sdk Name="Microsoft.Build.CentralPackageVersions" Version="2.1.3"/>
<PropertyGroup>
<TargetFrameworks>net6.0</TargetFrameworks>
<TargetFrameworks>net8.0</TargetFrameworks>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="JetBrains.Annotations"/>
<PackageReference Include="JetBrains.Annotations" VersionOverride="2023.3.0" PrivateAssets="All"/>
<PackageReference Include="Microsoft.EntityFrameworkCore"/>
</ItemGroup>
<ItemGroup>
Expand Down
Loading

0 comments on commit 6a0f096

Please sign in to comment.