Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: CI pipeline #4

Merged
merged 2 commits into from
Feb 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 0 additions & 15 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,21 +35,6 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Replace Test Connection String
run: |
$jsonContent = Get-Content -Path "./src/${{ env.PROJECT_NAME }}/appsettings.CI.json" -Raw
$config = $jsonContent | ConvertFrom-Json
$ciConnectionString = $config.ConnectionStrings.CMSConnectionString
$files = Get-ChildItem -Path "./test" -Filter "Tests.config" -Recurse

foreach ($file in $files) {
$xml = [xml](Get-Content $file.FullName)
$connectionStringNode = $xml.SelectSingleNode("//add[@name='CMSTestConnectionString']")
$connectionStringNode.SetAttribute("connectionString", $ciConnectionString)

$xml.Save($file.FullName)
}

- name: "Get node.js version from package.json"
run: |
$nodeVersion = (Get-Content -Raw -Path ./src/${{ env.PROJECT_NAME }}/package.json | ConvertFrom-Json).engines.node
Expand Down
2 changes: 1 addition & 1 deletion test/Kentico.Community.Portal.Web.E2E.Tests/Tests.config
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<connectionStrings>
<add name="CMSTestConnectionString" connectionString="Data Source=localhost;Initial Catalog=Kentico.Community;Integrated Security=True;Persist Security Info=False;Connect Timeout=10;Encrypt=False;Current Language=English;"/>
<add name="CMSTestConnectionString" connectionString="Data Source=localhost;Initial Catalog=Kentico.Community;User Id=sa;Password=Pass@12345;Persist Security Info=False;Connect Timeout=10;Encrypt=False;Current Language=English;TrustServerCertificate=True;"/>
</connectionStrings>
</configuration>
2 changes: 1 addition & 1 deletion test/Kentico.Community.Portal.Web.Tests/Tests.config
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<connectionStrings>
<add name="CMSTestConnectionString" connectionString="Data Source=localhost;Initial Catalog=Kentico.Community;Integrated Security=True;Persist Security Info=False;Connect Timeout=10;Encrypt=False;Current Language=English;"/>
<add name="CMSTestConnectionString" connectionString="Data Source=localhost;Initial Catalog=Kentico.Community;User Id=sa;Password=Pass@12345;Persist Security Info=False;Connect Timeout=10;Encrypt=False;Current Language=English;TrustServerCertificate=True;"/>
</connectionStrings>
</configuration>