File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -21,14 +21,10 @@ jobs:
2121 ports :
2222 - 1433:1433
2323 volumes :
24- - /var/opt/mssql/customdbs:/var/opt/mssql/customdbs
24+ - /tmp/other_databases_path:/tmp/other_databases_path
2525 steps :
2626 - uses : actions/checkout@v4
2727
28- - name : Prepare SQL custom dir
29- run : |
30- docker exec --user root $(docker ps -qf "ancestor=mcr.microsoft.com/mssql/server:2022-latest") chown -R mssql:mssql /var/opt/mssql/customdbs
31-
3228 - name : Setup .NET
3329 uses : actions/setup-dotnet@v4
3430 with :
@@ -54,11 +50,16 @@ jobs:
5450 sudo apt-get install -y mssql-tools
5551 echo "/opt/mssql-tools/bin" >> $GITHUB_PATH
5652
53+ - name : Prepare SQL databases directory
54+ run : |
55+ # Give the rights to the 'mssql' user to read/write in the /tmp/other_databases_path directory.
56+ docker exec --user root $(docker ps -qf "ancestor=mcr.microsoft.com/mssql/server:2022-latest") chown -R mssql:mssql /tmp/other_databases_path
57+
5758 - name : Run tests
5859 run : dotnet test PosInformatique.Testing.Databases.sln --configuration Release --no-build --logger "trx;LogFileName=test_results.trx" --results-directory ./TestResults
5960 env :
6061 SQL_SERVER_UNIT_TESTS_CONNECTION_STRING : " Data Source=localhost,1433;Database=master;User Id=sa;Password=P@ssw0rd12345!;TrustServerCertificate=True;"
61- SQL_SERVER_UNIT_TESTS_OTHER_DATA_PATH : " /var/opt/mssql/customdbs /"
62+ SQL_SERVER_UNIT_TESTS_OTHER_DATA_PATH : " /tmp/other_databases_path /"
6263
6364 - name : Publish Test Results
6465 uses : EnricoMi/publish-unit-test-result-action@v2
You can’t perform that action at this time.
0 commit comments