Skip to content

Commit

Permalink
Task/rdmp 91 update runner (#83)
Browse files Browse the repository at this point in the history
Run on Github hosted runner now we're OSS and can do so for free
  • Loading branch information
JFriel authored Nov 17, 2023
1 parent b7c766a commit db6b7df
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 5 deletions.
35 changes: 32 additions & 3 deletions .github/workflows/dotnet-core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ env:

jobs:
package:
runs-on: self-hosted
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v4
Expand All @@ -20,15 +20,44 @@ jobs:
path: RDMP
- uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.x
dotnet-version: 7.0.x
- name: Get version
id: version
shell: cmd
run: |
getversions >> %GITHUB_OUTPUT%
- name: Install MS SQL 2019 Express LocalDB
uses: crazy-max/ghaction-chocolatey@v3
with:
args: install -r sqllocaldb --no-progress
- name: Install python2
uses: crazy-max/ghaction-chocolatey@v3
with:
args: install -r python2
- name: Populate Databases.yaml
shell: bash
run: |
find ./RDMP/Tools/rdmp/Databases.yaml -type f -exec sed -i 's/RDMP_/TEST_/g' {} \;
# - name: Initialise LocalDB
# shell: bash
# run: |
# SqlLocalDB.exe create MSSQLLocalDB -s
# sqlcmd -l 180 -S '(localdb)\MSSQLLocalDB' -Q "SELECT @@VERSION;"
# sed -i'' -e 's/localhost/\(localdb\)\\MSSQLLocalDB/' RDMP/Tests.Common/TestDatabases.txt
- name: Install a SQL Server suite of tools
uses: potatoqualitee/[email protected]
with:
install: sqlengine, sqlclient, sqlpackage, localdb
- name: Run sqlclient
run: sqlcmd -S localhost -U sa -P dbatools.I0 -d tempdb -Q "SELECT @@version;"
- uses: shogo82148/actions-setup-mysql@v1
with:
mysql-version: '8.0'
root-password: 'YourStrong!Passw0rd'
auto-start: true
- name: Set up database
run: |
dotnet run --project RDMP/Tools/rdmp/rdmp.csproj -c Release -- install localhost TEST_ -d
dotnet run --project RDMP/Tools/rdmp/rdmp.csproj -c Release -- install --createdatabasetimeout 1800 localhost TEST_ -e
- name: Test
run: |
dotnet test
Expand Down
4 changes: 2 additions & 2 deletions LoadModules.Extensions.Tests/TestDatabases.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@

ServerName: localhost
Prefix: TEST_
MySql: Server=localhost;Uid=root;Pwd=zombie;SSLMode=None
Oracle: Data Source=localhost:1521/orclpdb.dundee.uni;User Id=ora;Password=zombie;
#MySql: Server=localhost;Uid=root;Pwd=zombie;SSLMode=None
#Oracle: Data Source=localhost:1521/orclpdb.dundee.uni;User Id=ora;Password=zombie;

#User accounts you can create with limited access rights (e.g. connect list databases etc). These users will be used in low privilege tests
#The account will be granted limited read/write access to databases on a per test basis (See DatabaseTests.SetupLowPrivilegeUserRightsFor)
Expand Down

0 comments on commit db6b7df

Please sign in to comment.