File tree Expand file tree Collapse file tree 2 files changed +80
-0
lines changed Expand file tree Collapse file tree 2 files changed +80
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Main Build
2
+
3
+ on :
4
+ pull_request :
5
+ push :
6
+ branches :
7
+ - main
8
+ paths :
9
+ - ' *'
10
+ - ' !/docs/*' # Don't run workflow when files are only in the /docs directory
11
+
12
+ jobs :
13
+ vm-job :
14
+ name : Ubuntu
15
+ runs-on : ubuntu-latest
16
+ services :
17
+ postgres :
18
+ image : postgres
19
+ ports :
20
+ - 5432/tcp
21
+ env :
22
+ POSTGRES_USER : postgres
23
+ POSTGRES_PASSWORD : postgres
24
+ POSTGRES_DB : test
25
+ options : --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
26
+ sqlserver :
27
+ image : mcr.microsoft.com/mssql/server:2017-latest-ubuntu
28
+ ports :
29
+ - 1433/tcp
30
+ env :
31
+ ACCEPT_EULA : Y
32
+ SA_PASSWORD : g0d4mm!tSQLServer
33
+ mysql :
34
+ image : mysql
35
+ ports :
36
+ - 3306/tcp
37
+ env :
38
+ MYSQL_ROOT_PASSWORD : root
39
+ MYSQL_DATABASE : test
40
+ steps :
41
+ - name : Checkout code
42
+ uses : actions/checkout@v1
43
+ - name : .NET Build
44
+ run : dotnet build Build.csproj -c Release /p:CI=true
45
+ - name : .NET Test
46
+ run : dotnet test Build.csproj -c Release --no-build /p:CI=true
47
+ env :
48
+ EnableTestLogging : true
49
+ MySQLConnectionString : server=localhost;Port=${{ job.services.mysql.ports[3306] }};Uid=root;Pwd=root;Database=test;Allow User Variables=true
50
+ PostgreSqlConnectionString : Server=localhost;Port=${{ job.services.postgres.ports[5432] }};Database=test;User Id=postgres;Password=postgres;
51
+ SQLServerConnectionString : Server=tcp:127.0.0.1,${{ job.services.sqlserver.ports[1433] }};Database=tempdb;User Id=sa;Password=g0d4mm!tSQLServer;
52
+ - name : .NET Lib Pack
53
+ run : dotnet pack Build.csproj --no-build -c Release /p:PackageOutputPath=%CD%\.nupkgs /p:CI=true
Original file line number Diff line number Diff line change
1
+ version : " 3"
2
+ services :
3
+ mysql :
4
+ image : mysql:8
5
+ container_name : mysql
6
+ ports :
7
+ - 3306:3306
8
+ environment :
9
+ MYSQL_ROOT_PASSWORD : root
10
+ MYSQL_DATABASE : test
11
+ postgres :
12
+ image : postgres:alpine
13
+ container_name : postgres
14
+ ports :
15
+ - 5432:5432
16
+ environment :
17
+ POSTGRES_USER : postgres
18
+ POSTGRES_PASSWORD : postgres
19
+ POSTGRES_DB : test
20
+ sqlserver :
21
+ image : microsoft/mssql-server-linux:2019-latest
22
+ container_name : sql-server-db
23
+ ports :
24
+ - 1433:1433
25
+ environment :
26
+ ACCEPT_EULA : Y
27
+ SA_PASSWORD : " saAccountI#v3rySecure"
You can’t perform that action at this time.
0 commit comments