Skip to content
Merged
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
336 changes: 167 additions & 169 deletions .github/workflows/nightlybuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,185 +26,184 @@

- name: Run Unit Tests
run: |
dotnet test "EstateManagementUI.BusinessLogic.Tests\EstateManagementUI.BusinessLogic.Tests.csproj" --settings .runsettings /p:CollectCoverage=true /p:Exclude="[xunit*]*" /p:ExcludeByAttribute="Obsolete" /p:ExcludeByAttribute="GeneratedCodeAttribute" /p:ExcludeByAttribute="ExcludeFromCodeCoverageAttribute" /p:CoverletOutput="../lcov1.info" /maxcpucount:1 /p:CoverletOutputFormat="lcov"
dotnet test "EstateManagementUI.UITests\EstateManagementUI.UITests.csproj" --settings .runsettings /p:CollectCoverage=true /p:Exclude="[xunit*]*" /p:ExcludeByAttribute="Obsolete" /p:ExcludeByAttribute="GeneratedCodeAttribute" /p:ExcludeByAttribute="ExcludeFromCodeCoverageAttribute" /p:CoverletOutput="../lcov2.info" /maxcpucount:1 /p:CoverletOutputFormat="lcov"
dotnet test "EstateManagementUI.BlazorServer.Tests\EstateManagementUI.BlazorServer.Tests.csproj" --settings .runsettings /p:CollectCoverage=true /p:Exclude="[xunit*]*" /p:ExcludeByAttribute="Obsolete" /p:ExcludeByAttribute="GeneratedCodeAttribute" /p:ExcludeByAttribute="ExcludeFromCodeCoverageAttribute" /p:CoverletOutput="../lcov3.info" /maxcpucount:1 /p:CoverletOutputFormat="lcov"

- name: Install LCOV merger
run: npm install -g lcov-result-merger

- name: Merge LCOV reports
run: |
mkdir -p coverage
lcov-result-merger "*.info" > lcov.info

- name: Upload merged coverage to Codacy
uses: codacy/codacy-coverage-reporter-action@v1
with:
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
coverage-reports: ./lcov.info

chrometests:
name: "Nightly Build - Chrome"
env:
ASPNETCORE_ENVIRONMENT: "Production"
NODE_VERSION: '14.x' # set this to the node version to use

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2.3.4

- name: Trust Certificate
run: |
sudo apt-get install expect
certPath="$GITHUB_WORKSPACE/Certificates/aspnetapp-root-cert.pfx"
password="password"

# Use expect to automate the passphrase input
expect -c "
spawn openssl pkcs12 -in \"$certPath\" -clcerts -nokeys -out certificate.crt -password pass:\"$password\"
expect \"Enter Import Password:\" { send \"$password\n\" }
expect eof
"

expect -c "
spawn openssl pkcs12 -in \"$certPath\" -nocerts -out private.key -password pass:\"$password\"
expect \"Enter Import Password:\" { send \"$password\n\" }
expect eof
"

sudo cp certificate.crt /usr/local/share/ca-certificates/aspnetapp-root-cert.crt
sudo update-ca-certificates

sudo cp private.key /etc/ssl/private/aspnetapp-root-cert.key
sudo chmod 400 /etc/ssl/private/aspnetapp-root-cert.key
dotnet test EstateManagementUI.BlazorServer.Tests/EstateManagementUI.BlazorServer.Tests.csproj --settings .runsettings /p:CollectCoverage=true /p:Exclude="[xunit*]*" /p:ExcludeByAttribute="Obsolete" /p:ExcludeByAttribute="GeneratedCodeAttribute" /p:ExcludeByAttribute="ExcludeFromCodeCoverageAttribute" /p:CoverletOutput="../lcov1.info" /maxcpucount:1 /p:CoverletOutputFormat="lcov"

# - name: Install LCOV merger
# run: npm install -g lcov-result-merger

# - name: Merge LCOV reports
# run: |
# mkdir -p coverage
# lcov-result-merger "*.info" > lcov.info

# - name: Upload merged coverage to Codacy
# uses: codacy/codacy-coverage-reporter-action@v1
# with:
# project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
# coverage-reports: ./lcov.info


# chrometests:
# name: "Nightly Build - Chrome"
# env:
# ASPNETCORE_ENVIRONMENT: "Production"
# NODE_VERSION: '14.x' # set this to the node version to use

# runs-on: ubuntu-latest

# steps:
# - uses: actions/checkout@v2.3.4

# - name: Trust Certificate
# run: |
# sudo apt-get install expect
# certPath="$GITHUB_WORKSPACE/Certificates/aspnetapp-root-cert.pfx"
# password="password"

Check failure on line 61 in .github/workflows/nightlybuild.yml

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

.github/workflows/nightlybuild.yml#L61

A gitleaks hashicorp-tf-password was detected which attempts to identify hard-coded credentials.

# # Use expect to automate the passphrase input
# expect -c "
# spawn openssl pkcs12 -in \"$certPath\" -clcerts -nokeys -out certificate.crt -password pass:\"$password\"
# expect \"Enter Import Password:\" { send \"$password\n\" }
# expect eof
# "

# expect -c "
# spawn openssl pkcs12 -in \"$certPath\" -nocerts -out private.key -password pass:\"$password\"
# expect \"Enter Import Password:\" { send \"$password\n\" }
# expect eof
# "

# sudo cp certificate.crt /usr/local/share/ca-certificates/aspnetapp-root-cert.crt
# sudo update-ca-certificates

# sudo cp private.key /etc/ssl/private/aspnetapp-root-cert.key
# sudo chmod 400 /etc/ssl/private/aspnetapp-root-cert.key

- name: Build Docker Image
run: docker build . --file EstateManagementUI/Dockerfile --tag estatemanagementui:latest
# - name: Build Docker Image
# run: docker build . --file EstateManagementUI/Dockerfile --tag estatemanagementui:latest

- name: Restore Nuget Packages
run: dotnet restore EstateManagementUI.sln --source ${{ secrets.PUBLICFEEDURL }} --source ${{ secrets.PRIVATEFEED_URL }}
# - name: Restore Nuget Packages
# run: dotnet restore EstateManagementUI.sln --source ${{ secrets.PUBLICFEEDURL }} --source ${{ secrets.PRIVATEFEED_URL }}

- name: Run Integration Tests (Chrome)
env:
Browser: Chrome
IsCI: true
run: dotnet test "EstateManagementUI.IntegrationTests\EstateManagementUI.IntegrationTests.csproj" --filter Category=PRTest
# - name: Run Integration Tests (Chrome)
# env:
# Browser: Chrome
# IsCI: true
# run: dotnet test "EstateManagementUI.IntegrationTests\EstateManagementUI.IntegrationTests.csproj" --filter Category=PRTest

- uses: actions/upload-artifact@v4.4.0
if: ${{ failure() }}
with:
name: chrometracelogs
path: /home/txnproc/trace/

edgetests:
name: "Nightly Build - Edge"
env:
ASPNETCORE_ENVIRONMENT: "Production"
NODE_VERSION: '14.x' # set this to the node version to use

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2.3.4

- name: Trust Certificate
run: |
sudo apt-get install expect
certPath="$GITHUB_WORKSPACE/Certificates/aspnetapp-root-cert.pfx"
password="password"

# Use expect to automate the passphrase input
expect -c "
spawn openssl pkcs12 -in \"$certPath\" -clcerts -nokeys -out certificate.crt -password pass:\"$password\"
expect \"Enter Import Password:\" { send \"$password\n\" }
expect eof
"

expect -c "
spawn openssl pkcs12 -in \"$certPath\" -nocerts -out private.key -password pass:\"$password\"
expect \"Enter Import Password:\" { send \"$password\n\" }
expect eof
"

sudo cp certificate.crt /usr/local/share/ca-certificates/aspnetapp-root-cert.crt
sudo update-ca-certificates

sudo cp private.key /etc/ssl/private/aspnetapp-root-cert.key
sudo chmod 400 /etc/ssl/private/aspnetapp-root-cert.key
# - uses: actions/upload-artifact@v4.4.0
# if: ${{ failure() }}
# with:
# name: chrometracelogs
# path: /home/txnproc/trace/

# edgetests:
# name: "Nightly Build - Edge"
# env:
# ASPNETCORE_ENVIRONMENT: "Production"
# NODE_VERSION: '14.x' # set this to the node version to use

# runs-on: ubuntu-latest

# steps:
# - uses: actions/checkout@v2.3.4

# - name: Trust Certificate
# run: |
# sudo apt-get install expect
# certPath="$GITHUB_WORKSPACE/Certificates/aspnetapp-root-cert.pfx"
# password="password"

# # Use expect to automate the passphrase input
# expect -c "
# spawn openssl pkcs12 -in \"$certPath\" -clcerts -nokeys -out certificate.crt -password pass:\"$password\"
# expect \"Enter Import Password:\" { send \"$password\n\" }
# expect eof
# "

# expect -c "
# spawn openssl pkcs12 -in \"$certPath\" -nocerts -out private.key -password pass:\"$password\"
# expect \"Enter Import Password:\" { send \"$password\n\" }
# expect eof
# "

# sudo cp certificate.crt /usr/local/share/ca-certificates/aspnetapp-root-cert.crt
# sudo update-ca-certificates

# sudo cp private.key /etc/ssl/private/aspnetapp-root-cert.key
# sudo chmod 400 /etc/ssl/private/aspnetapp-root-cert.key

- name: Build Docker Image
run: docker build . --file EstateManagementUI/Dockerfile --tag estatemanagementui:latest
# - name: Build Docker Image
# run: docker build . --file EstateManagementUI/Dockerfile --tag estatemanagementui:latest

- name: Restore Nuget Packages
run: dotnet restore EstateManagementUI.sln --source ${{ secrets.PUBLICFEEDURL }} --source ${{ secrets.PRIVATEFEED_URL }}
# - name: Restore Nuget Packages
# run: dotnet restore EstateManagementUI.sln --source ${{ secrets.PUBLICFEEDURL }} --source ${{ secrets.PRIVATEFEED_URL }}

- name: Run Integration Tests (Edge)
env:
Browser: Edge
IsCI: true
run: dotnet test "EstateManagementUI.IntegrationTests\EstateManagementUI.IntegrationTests.csproj" --filter Category=PRTest
# - name: Run Integration Tests (Edge)
# env:
# Browser: Edge
# IsCI: true
# run: dotnet test "EstateManagementUI.IntegrationTests\EstateManagementUI.IntegrationTests.csproj" --filter Category=PRTest

- uses: actions/upload-artifact@v4.4.0
if: ${{ failure() }}
with:
name: edgetracelogs
path: /home/txnproc/trace/

fireefoxtests:
name: "Nightly Build - Firefox"
env:
ASPNETCORE_ENVIRONMENT: "Production"
NODE_VERSION: '14.x' # set this to the node version to use

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2.3.4

- name: Trust Certificate
run: |
sudo apt-get install expect
certPath="$GITHUB_WORKSPACE/Certificates/aspnetapp-root-cert.pfx"
password="password"

# Use expect to automate the passphrase input
expect -c "
spawn openssl pkcs12 -in \"$certPath\" -clcerts -nokeys -out certificate.crt -password pass:\"$password\"
expect \"Enter Import Password:\" { send \"$password\n\" }
expect eof
"

expect -c "
spawn openssl pkcs12 -in \"$certPath\" -nocerts -out private.key -password pass:\"$password\"
expect \"Enter Import Password:\" { send \"$password\n\" }
expect eof
"

sudo cp certificate.crt /usr/local/share/ca-certificates/aspnetapp-root-cert.crt
sudo update-ca-certificates

sudo cp private.key /etc/ssl/private/aspnetapp-root-cert.key
sudo chmod 400 /etc/ssl/private/aspnetapp-root-cert.key
# - uses: actions/upload-artifact@v4.4.0
# if: ${{ failure() }}
# with:
# name: edgetracelogs
# path: /home/txnproc/trace/

# fireefoxtests:
# name: "Nightly Build - Firefox"
# env:
# ASPNETCORE_ENVIRONMENT: "Production"
# NODE_VERSION: '14.x' # set this to the node version to use

# runs-on: ubuntu-latest

# steps:
# - uses: actions/checkout@v2.3.4

# - name: Trust Certificate
# run: |
# sudo apt-get install expect
# certPath="$GITHUB_WORKSPACE/Certificates/aspnetapp-root-cert.pfx"
# password="password"

# # Use expect to automate the passphrase input
# expect -c "
# spawn openssl pkcs12 -in \"$certPath\" -clcerts -nokeys -out certificate.crt -password pass:\"$password\"
# expect \"Enter Import Password:\" { send \"$password\n\" }
# expect eof
# "

# expect -c "
# spawn openssl pkcs12 -in \"$certPath\" -nocerts -out private.key -password pass:\"$password\"
# expect \"Enter Import Password:\" { send \"$password\n\" }
# expect eof
# "

# sudo cp certificate.crt /usr/local/share/ca-certificates/aspnetapp-root-cert.crt
# sudo update-ca-certificates

# sudo cp private.key /etc/ssl/private/aspnetapp-root-cert.key
# sudo chmod 400 /etc/ssl/private/aspnetapp-root-cert.key

- name: Build Docker Image
run: docker build . --file EstateManagementUI/Dockerfile --tag estatemanagementui:latest
# - name: Build Docker Image
# run: docker build . --file EstateManagementUI/Dockerfile --tag estatemanagementui:latest

- name: Restore Nuget Packages
run: dotnet restore EstateManagementUI.sln --source ${{ secrets.PUBLICFEEDURL }} --source ${{ secrets.PRIVATEFEED_URL }}
# - name: Restore Nuget Packages
# run: dotnet restore EstateManagementUI.sln --source ${{ secrets.PUBLICFEEDURL }} --source ${{ secrets.PRIVATEFEED_URL }}

- name: Run Integration Tests (Firefox)
env:
Browser: Firefox
IsCI: true
run: dotnet test "EstateManagementUI.IntegrationTests\EstateManagementUI.IntegrationTests.csproj" --filter Category=PRTest
# - name: Run Integration Tests (Firefox)
# env:
# Browser: Firefox
# IsCI: true
# run: dotnet test "EstateManagementUI.IntegrationTests\EstateManagementUI.IntegrationTests.csproj" --filter Category=PRTest

- uses: actions/upload-artifact@v4.4.0
if: ${{ failure() }}
with:
name: firefoxtracelogs
path: /home/txnproc/trace/
# - uses: actions/upload-artifact@v4.4.0
# if: ${{ failure() }}
# with:
# name: firefoxtracelogs
# path: /home/txnproc/trace/

codecoverage:
name: "Nightly Build - Code Coverage"
Expand All @@ -225,8 +224,7 @@
- name: Run Unit Tests
run: |
echo "ASPNETCORE_ENVIRONMENT are > ${ASPNETCORE_ENVIRONMENT}"
dotnet test "EstateManagementUI.BusinessLogic.Tests\EstateManagementUI.BusinessLogic.Tests.csproj" --settings .runsettings /p:CollectCoverage=true /p:Exclude="[xunit*]*" /p:ExcludeByAttribute="Obsolete" /p:ExcludeByAttribute="GeneratedCodeAttribute" /p:ExcludeByAttribute="ExcludeFromCodeCoverageAttribute" /p:CoverletOutput="../lcov1.info" /maxcpucount:1 /p:CoverletOutputFormat="lcov"
dotnet test "EstateManagementUI.BlazorServer.Tests\EstateManagementUI.BlazorServer.Tests.csproj" --settings .runsettings /p:CollectCoverage=true /p:Exclude="[xunit*]*" /p:ExcludeByAttribute="Obsolete" /p:ExcludeByAttribute="GeneratedCodeAttribute" /p:ExcludeByAttribute="ExcludeFromCodeCoverageAttribute" /p:CoverletOutput="../lcov2.info" /maxcpucount:1 /p:CoverletOutputFormat="lcov"
dotnet test EstateManagementUI.BlazorServer.Tests/EstateManagementUI.BlazorServer.Tests.csproj --settings .runsettings /p:CollectCoverage=true /p:Exclude="[xunit*]*" /p:ExcludeByAttribute="Obsolete" /p:ExcludeByAttribute="GeneratedCodeAttribute" /p:ExcludeByAttribute="ExcludeFromCodeCoverageAttribute" /p:CoverletOutput="../lcov1.info" /maxcpucount:1 /p:CoverletOutputFormat="lcov"

- name: Merge LCOV reports
run: |
Expand Down
Loading