This repository was archived by the owner on Sep 3, 2024. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -38,6 +38,12 @@ COPY ./src/*/*.csproj ./src/Directory.Build.props ./
3838
3939RUN for file in $(ls *.csproj); do mkdir -p ./${file%.*}/ && mv $file ./${file%.*}/; done
4040
41+ WORKDIR /app/tests
42+
43+ COPY ./tests/*/*.csproj ./
44+
45+ RUN for file in $(ls *.csproj); do mkdir -p ./${file%.*}/ && mv $file ./${file%.*}/; done
46+
4147WORKDIR /app
4248
4349COPY ./NuGet.Config ./
@@ -50,6 +56,10 @@ COPY ./src .
5056
5157COPY --from=build-javascript /app/node_modules/${CLIENT_PACKAGE}/build /app/src/SqlStreamStore.Server/Browser/build
5258
59+ WORKDIR /app/tests
60+
61+ COPY ./tests .
62+
5363WORKDIR /app/build
5464
5565COPY ./build/build.csproj .
@@ -58,6 +68,10 @@ RUN dotnet restore
5868
5969COPY ./build .
6070
71+ WORKDIR /app/src
72+
73+ COPY ./src .
74+
6175WORKDIR /app
6276
6377RUN dotnet run --project build/build.csproj -- --runtime=${RUNTIME} --library-version=${LIBRARY_VERSION}
Original file line number Diff line number Diff line change 33set -e
44
55CONTAINER_RUNTIME=${CONTAINER_RUNTIME:- alpine3.9}
6- LIBRARY_VERSION=${LIBRARY_VERSION:- 1.2.0-beta.3.12 }
6+ LIBRARY_VERSION=${LIBRARY_VERSION:- 1.2.0-beta.3.19 }
77CLIENT_VERSION=${CLIENT_VERSION:- 0.9.2}
88
99LOCAL_IMAGE=" sql-stream-store-server"
Original file line number Diff line number Diff line change @@ -12,9 +12,10 @@ static class Program
1212
1313 public static void Main ( string [ ] args )
1414 {
15- const string clean = nameof ( Clean ) ;
16- const string build = nameof ( Build ) ;
17- const string publish = nameof ( Publish ) ;
15+ const string clean = nameof ( clean ) ;
16+ const string build = nameof ( build ) ;
17+ const string test = nameof ( test ) ;
18+ const string publish = nameof ( publish ) ;
1819
1920 var runtime = "alpine-x64" ;
2021 var libraryVersion = "1.2.0-beta.*" ;
@@ -43,8 +44,13 @@ public static void Main(string[] args)
4344 Build ( libraryVersion ) ) ;
4445
4546 Target (
46- publish ,
47+ test ,
4748 DependsOn ( build ) ,
49+ Test ) ;
50+
51+ Target (
52+ publish ,
53+ DependsOn ( test ) ,
4854 Publish ( runtime , libraryVersion ) ) ;
4955
5056 Target ( "default" , DependsOn ( publish ) ) ;
@@ -69,6 +75,10 @@ private static Action Build(string libraryVersion) => () => Run(
6975 "dotnet" ,
7076 $ "build SqlStreamStore.Server.sln --configuration=Release /p:LibraryVersion={ libraryVersion } ") ;
7177
78+ private static readonly Action Test = ( ) => Run (
79+ "dotnet" ,
80+ $ "test --configuration=Release --no-build") ;
81+
7282 private static Action Publish ( string runtime , string libraryVersion ) => ( ) => Run (
7383 "dotnet" ,
7484 $ "publish --configuration=Release --output=../../{ PublishDir } --runtime={ runtime } /p:ShowLinkerSizeComparison=true /p:LibraryVersion={ libraryVersion } src/SqlStreamStore.Server") ;
You can’t perform that action at this time.
0 commit comments