Compare commits

...

1 Commits

Author SHA1 Message Date
972a147fb9 Create initial project 2022-07-18 21:57:33 -04:00
7 changed files with 135 additions and 0 deletions

25
src/.dockerignore Normal file
View File

@ -0,0 +1,25 @@
**/.dockerignore
**/.env
**/.git
**/.gitignore
**/.project
**/.settings
**/.toolstarget
**/.vs
**/.vscode
**/.idea
**/*.*proj.user
**/*.dbmdl
**/*.jfm
**/azds.yaml
**/bin
**/charts
**/docker-compose*
**/Dockerfile*
**/node_modules
**/npm-debug.log
**/obj
**/secrets.dev.yaml
**/values.dev.yaml
LICENSE
README.md

23
src/Dockerfile Normal file
View File

@ -0,0 +1,23 @@
FROM mcr.microsoft.com/dotnet/runtime:6.0 AS base
WORKDIR /app
FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build
WORKDIR /src
COPY ["RethinkDb.Driver.FSharp.Tests/RethinkDb.Driver.FSharp.Tests.fsproj", "RethinkDb.Driver.FSharp.Tests/"]
RUN dotnet restore "RethinkDb.Driver.FSharp.Tests/RethinkDb.Driver.FSharp.Tests.fsproj"
COPY . .
WORKDIR "/src/RethinkDb.Driver.FSharp.Tests"
RUN dotnet build "RethinkDb.Driver.FSharp.Tests.fsproj" -c Release -o /app/build
FROM build AS publish
RUN dotnet publish "RethinkDb.Driver.FSharp.Tests.fsproj" -c Release -r linux-x64 --self-contained true -o /app/publish
FROM rethinkdb:latest AS test
WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT ["RethinkDb.Driver.FSharp.Tests"]
# FROM base AS final
# WORKDIR /app
# COPY --from=publish /app/publish .
# ENTRYPOINT ["dotnet", "RethinkDb.Driver.FSharp.Tests.dll"]

View File

@ -0,0 +1 @@
module Program = let [<EntryPoint>] main _ = 0

View File

@ -0,0 +1,39 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<IsPackable>false</IsPackable>
<GenerateProgramFile>false</GenerateProgramFile>
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
</PropertyGroup>
<ItemGroup>
<Compile Include="Types.fs" />
<Compile Include="Tests.fs" />
<Compile Include="Program.fs" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.11.0" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="coverlet.collector" Version="3.1.0">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
</ItemGroup>
<ItemGroup>
<Content Include=".dockerignore" />
<Content Include="Dockerfile" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\RethinkDb.Driver.FSharp\RethinkDb.Driver.FSharp.fsproj" />
</ItemGroup>
</Project>

View File

@ -0,0 +1,17 @@
module Tests
open System
open RethinkDb.Driver
open RethinkDb.Driver.FSharp.Functions
open Types
open Xunit
let private r = RethinkDB.R
[<Fact>]
let ``My test`` () =
Assert.True(true)
let ``dbCreate succeeds`` () =
dbCreate "fsharp_driver_test"
|> runWrite

View File

@ -0,0 +1,16 @@
module Types
/// A simple type to use for testing
type BasicType =
{ // The ID for this record
id : string
/// A field with a boolean value
boolField : bool
/// A field with an integer value
intField : int
/// A field with a string value
stringField : string
}

View File

@ -4,6 +4,8 @@ VisualStudioVersion = 17.1.32228.430
MinimumVisualStudioVersion = 15.0.26124.0 MinimumVisualStudioVersion = 15.0.26124.0
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "RethinkDb.Driver.FSharp", "RethinkDb.Driver.FSharp\RethinkDb.Driver.FSharp.fsproj", "{9026E009-55DC-454E-87B7-39B9CBAD8BF8}" Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "RethinkDb.Driver.FSharp", "RethinkDb.Driver.FSharp\RethinkDb.Driver.FSharp.fsproj", "{9026E009-55DC-454E-87B7-39B9CBAD8BF8}"
EndProject EndProject
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "RethinkDb.Driver.FSharp.Tests", "RethinkDb.Driver.FSharp.Tests\RethinkDb.Driver.FSharp.Tests.fsproj", "{FC062B8C-81D5-4E0A-B3BA-A84541298BDB}"
EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU Debug|Any CPU = Debug|Any CPU
@ -26,6 +28,18 @@ Global
{9026E009-55DC-454E-87B7-39B9CBAD8BF8}.Release|x64.Build.0 = Release|Any CPU {9026E009-55DC-454E-87B7-39B9CBAD8BF8}.Release|x64.Build.0 = Release|Any CPU
{9026E009-55DC-454E-87B7-39B9CBAD8BF8}.Release|x86.ActiveCfg = Release|Any CPU {9026E009-55DC-454E-87B7-39B9CBAD8BF8}.Release|x86.ActiveCfg = Release|Any CPU
{9026E009-55DC-454E-87B7-39B9CBAD8BF8}.Release|x86.Build.0 = Release|Any CPU {9026E009-55DC-454E-87B7-39B9CBAD8BF8}.Release|x86.Build.0 = Release|Any CPU
{FC062B8C-81D5-4E0A-B3BA-A84541298BDB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{FC062B8C-81D5-4E0A-B3BA-A84541298BDB}.Debug|Any CPU.Build.0 = Debug|Any CPU
{FC062B8C-81D5-4E0A-B3BA-A84541298BDB}.Debug|x64.ActiveCfg = Debug|Any CPU
{FC062B8C-81D5-4E0A-B3BA-A84541298BDB}.Debug|x64.Build.0 = Debug|Any CPU
{FC062B8C-81D5-4E0A-B3BA-A84541298BDB}.Debug|x86.ActiveCfg = Debug|Any CPU
{FC062B8C-81D5-4E0A-B3BA-A84541298BDB}.Debug|x86.Build.0 = Debug|Any CPU
{FC062B8C-81D5-4E0A-B3BA-A84541298BDB}.Release|Any CPU.ActiveCfg = Release|Any CPU
{FC062B8C-81D5-4E0A-B3BA-A84541298BDB}.Release|Any CPU.Build.0 = Release|Any CPU
{FC062B8C-81D5-4E0A-B3BA-A84541298BDB}.Release|x64.ActiveCfg = Release|Any CPU
{FC062B8C-81D5-4E0A-B3BA-A84541298BDB}.Release|x64.Build.0 = Release|Any CPU
{FC062B8C-81D5-4E0A-B3BA-A84541298BDB}.Release|x86.ActiveCfg = Release|Any CPU
{FC062B8C-81D5-4E0A-B3BA-A84541298BDB}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection EndGlobalSection
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE