@@ -11,19 +11,87 @@ jobs:
1111
1212 runs-on : ubuntu-latest
1313
14+ services :
15+ sqlserver :
16+ image : mcr.microsoft.com/mssql/server:2019-latest
17+ ports :
18+ - 1433:1433
19+ env :
20+ SA_PASSWORD : YourStrong@Passw0rd
21+ ACCEPT_EULA : Y
22+ options : >-
23+ --health-cmd "bash -c '</dev/tcp/localhost/1433' && exit 0 || exit 1"
24+ --health-interval=10s
25+ --health-timeout=5s
26+ --health-retries=10
27+
28+ postgres :
29+ image : postgres:13
30+ ports :
31+ - 5432:5432
32+ env :
33+ POSTGRES_USER : testuser
34+ POSTGRES_PASSWORD : testpass
35+ POSTGRES_DB : testdb
36+ options : >-
37+ --health-cmd="pg_isready -U testuser"
38+ --health-interval=10s
39+ --health-timeout=5s
40+ --health-retries=5
41+
42+ oracle :
43+ image : gvenzl/oracle-free:latest
44+ ports :
45+ - 1521:1521
46+ env :
47+ ORACLE_RANDOM_PASSWORD : true
48+ APP_USER : test
49+ APP_USER_PASSWORD : test
50+ options : >-
51+ --health-cmd healthcheck.sh
52+ --health-interval 10s
53+ --health-timeout 5s
54+ --health-retries 10
55+
56+ mysql :
57+ image : mysql:8.0
58+ ports :
59+ - 3306:3306
60+ env :
61+ MYSQL_ROOT_PASSWORD : rootpass
62+ MYSQL_DATABASE : testdb
63+ MYSQL_USER : testuser
64+ MYSQL_PASSWORD : testpass
65+ options : >-
66+ --health-cmd="mysqladmin ping -h localhost -u root -prootpass"
67+ --health-interval=10s
68+ --health-timeout=5s
69+ --health-retries=10
70+
1471 steps :
1572 - uses : actions/checkout@v4
16- - name : Fetch history
17- run : git fetch --prune --unshallow
1873 - name : Setup .NET
1974 uses : actions/setup-dotnet@v4
2075 with :
2176 dotnet-version : |
2277 9.0.x
78+ - name : Install SQLCMD tools
79+ run : |
80+ curl https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -
81+ curl https://packages.microsoft.com/config/ubuntu/20.04/prod.list | sudo tee /etc/apt/sources.list.d/msprod.list
82+ sudo apt-get update
83+ sudo ACCEPT_EULA=Y apt-get install -y mssql-tools unixodbc-dev
84+ echo 'export PATH="$PATH:/opt/mssql-tools/bin"' >> ~/.bashrc
85+ source ~/.bashrc
86+ - name : Create SQLServer database
87+ run : |
88+ /opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P 'YourStrong@Passw0rd' -Q "CREATE DATABASE [Whatever];"
2389 - name : Restore dependencies
2490 run : |
2591 dotnet restore Migrator.slnx
26-
2792 - name : Build
2893 run : |
29- dotnet build -c Release Migrator.slnx
94+ dotnet build Migrator.slnx
95+ - name : Test
96+ run : |
97+ dotnet test Migrator.slnx
0 commit comments