Nightly Build #2003
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Nightly Build | |
| on: | |
| schedule: | |
| - cron: "30 23 * * *" | |
| repository_dispatch: | |
| jobs: | |
| buildnonui: | |
| name: "Nightly Build - Non UI" | |
| env: | |
| ASPNETCORE_ENVIRONMENT: "Production" | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/[email protected] | |
| - name: Install NET 9 | |
| uses: actions/[email protected] | |
| with: | |
| dotnet-version: '9.0.x' | |
| - name: Set Up Variables | |
| run: echo "action_url=$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID" >> $GITHUB_ENV | |
| - name: Trust Root Certificate | |
| run: | | |
| certPath="$GITHUB_WORKSPACE/Certificates/aspnetapp-root-cert.pfx" | |
| password="password" | |
| openssl pkcs12 -in "$certPath" -out temp.pem -nodes -password "pass:$password" | |
| sudo cp temp.pem /usr/local/share/ca-certificates/aspnetapp-root-cert.crt | |
| sudo update-ca-certificates | |
| - name: Trust Certificate | |
| run: | | |
| certPath="$GITHUB_WORKSPACE/Certificates/aspnetapp-web-api.pfx" | |
| password="password" | |
| openssl pkcs12 -in "$certPath" -out temp.pem -nodes -password "pass:$password" | |
| sudo cp temp.pem /usr/local/share/ca-certificates/aspnetapp-web-api.crt | |
| sudo update-ca-certificates | |
| - name: Restore Nuget Packages | |
| run: dotnet restore SecurityService.sln --source ${{ secrets.PUBLICFEEDURL }} --source ${{ secrets.PRIVATEFEED_URL }} | |
| - name: Build Code | |
| run: dotnet build SecurityService.sln --configuration Release | |
| - name: Run Unit Tests | |
| run: | | |
| echo "ASPNETCORE_ENVIRONMENT are > ${ASPNETCORE_ENVIRONMENT}" | |
| dotnet test "SecurityService.UnitTests\SecurityService.UnitTests.csproj" /p:ExcludeByFile="\SecurityService\Views\**\*.cshtml" /p:CollectCoverage=true /p:Exclude="[xunit*]*" /p:ExcludeByAttribute="Obsolete" /p:ExcludeByAttribute="GeneratedCodeAttribute" /p:ExcludeByAttribute="CompilerGeneratedAttribute" /p:ExcludeByAttribute="ExcludeFromCodeCoverageAttribute" /p:CoverletOutput="../lcov1.info" /maxcpucount:1 /p:CoverletOutputFormat="lcov" | |
| - name: Build Docker Images | |
| run: | | |
| docker build . --file SecurityService/Dockerfile --tag securityservice:latest | |
| docker build . --file SecurityServiceTestUI/Dockerfile --tag securityservicetestui:latest | |
| - name: Run Integration Tests (Non UI) | |
| run: | | |
| dotnet test "SecurityService.IntegrationTests\SecurityService.IntegrationTests.csproj" --filter Category=PRTest | |
| - uses: actions/[email protected] | |
| if: ${{ failure() }} | |
| with: | |
| name: nonuilogs | |
| path: /home/txnproc/trace/ | |
| - name: Create Issue on Failed workflow | |
| if: ${{ failure() }} | |
| uses: dacbd/create-issue-action@main | |
| with: | |
| token: ${{ github.token }} | |
| title: Investigate Nightly Build Failure - Non UI Tests | |
| body: Url is ${{env.action_url}} | |
| labels: nightlybuild | |
| buildfirefoxui: | |
| name: "Nightly Build - Firefox UI" | |
| env: | |
| ASPNETCORE_ENVIRONMENT: "Production" | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/[email protected] | |
| - name: Set Up Variables | |
| run: echo "action_url=$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID" >> $GITHUB_ENV | |
| - name: Trust Root Certificate | |
| run: | | |
| certPath="$GITHUB_WORKSPACE/Certificates/aspnetapp-root-cert.pfx" | |
| password="password" | |
| openssl pkcs12 -in "$certPath" -out temp.pem -nodes -password "pass:$password" | |
| sudo cp temp.pem /usr/local/share/ca-certificates/aspnetapp-root-cert.crt | |
| sudo update-ca-certificates | |
| - name: Trust Certificate | |
| run: | | |
| certPath="$GITHUB_WORKSPACE/Certificates/aspnetapp-web-api.pfx" | |
| password="password" | |
| openssl pkcs12 -in "$certPath" -out temp.pem -nodes -password "pass:$password" | |
| sudo cp temp.pem /usr/local/share/ca-certificates/aspnetapp-web-api.crt | |
| sudo update-ca-certificates | |
| - name: Install NET 9 | |
| uses: actions/[email protected] | |
| with: | |
| dotnet-version: '9.0.x' | |
| - name: Restore Nuget Packages | |
| run: dotnet restore SecurityService.sln --source ${{ secrets.PUBLICFEEDURL }} --source ${{ secrets.PRIVATEFEED_URL }} | |
| - name: Build Code | |
| run: dotnet build SecurityService.sln --configuration Release | |
| - name: Build Docker Images | |
| run: | | |
| docker build . --file SecurityService/Dockerfile --tag securityservice:latest | |
| docker build . --file SecurityServiceTestUI/Dockerfile --tag securityservicetestui:latest | |
| - name: Run Integration Tests (UI Firefox) | |
| env: | |
| Browser: Firefox | |
| run: | | |
| dotnet test "SecurityService.OpenIdConnect.IntegrationTests\SecurityService.OpenIdConnect.IntegrationTests.csproj" --filter Category=PRTest | |
| - uses: actions/[email protected] | |
| if: ${{ failure() }} | |
| with: | |
| name: firefoxlogs | |
| path: /home/txnproc/trace/ | |
| - uses: dacbd/create-issue-action@main | |
| if: ${{ failure() }} | |
| name: Create an issue on build failure | |
| with: | |
| title: Investigate Nightly Build Failure - Firefox UI | |
| token: ${{secrets.GITHUB_TOKEN}} | |
| labels: nightlybuild | |
| body: Url is ${{env.action_url}} | |
| # buildchromeui: | |
| # name: "Nightly Build - Chrome UI" | |
| # env: | |
| # ASPNETCORE_ENVIRONMENT: "Production" | |
| # runs-on: ubuntu-latest | |
| # steps: | |
| # - uses: actions/[email protected] | |
| # - name: Set Up Variables | |
| # run: echo "action_url=$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID" >> $GITHUB_ENV | |
| # - name: Trust Root Certificate | |
| # run: | | |
| # certPath="$GITHUB_WORKSPACE/Certificates/aspnetapp-root-cert.pfx" | |
| # password="password" | |
| # openssl pkcs12 -in "$certPath" -out temp.pem -nodes -password "pass:$password" | |
| # sudo cp temp.pem /usr/local/share/ca-certificates/aspnetapp-root-cert.crt | |
| # sudo update-ca-certificates | |
| # - name: Trust Certificate | |
| # run: | | |
| # certPath="$GITHUB_WORKSPACE/Certificates/aspnetapp-web-api.pfx" | |
| # password="password" | |
| # openssl pkcs12 -in "$certPath" -out temp.pem -nodes -password "pass:$password" | |
| # sudo cp temp.pem /usr/local/share/ca-certificates/aspnetapp-web-api.crt | |
| # sudo update-ca-certificates | |
| # - name: Install NET 9 | |
| # uses: actions/[email protected] | |
| # with: | |
| # dotnet-version: '9.0.x' | |
| # - name: Restore Nuget Packages | |
| # run: dotnet restore SecurityService.sln --source ${{ secrets.PUBLICFEEDURL }} --source ${{ secrets.PRIVATEFEED_URL }} | |
| # - name: Build Code | |
| # run: dotnet build SecurityService.sln --configuration Release | |
| # - name: Run Unit Tests | |
| # run: | | |
| # echo "ASPNETCORE_ENVIRONMENT are > ${ASPNETCORE_ENVIRONMENT}" | |
| # dotnet test "SecurityService.UnitTests\SecurityService.UnitTests.csproj" /p:ExcludeByFile="\SecurityService\Views\**\*.cshtml" /p:CollectCoverage=true /p:Exclude="[xunit*]*" /p:ExcludeByAttribute="Obsolete" /p:ExcludeByAttribute="GeneratedCodeAttribute" /p:ExcludeByAttribute="CompilerGeneratedAttribute" /p:ExcludeByAttribute="ExcludeFromCodeCoverageAttribute" /p:CoverletOutput="../lcov1.info" /maxcpucount:1 /p:CoverletOutputFormat="lcov" | |
| # - name: Build Docker Images | |
| # run: | | |
| # docker build . --file SecurityService/Dockerfile --tag securityservice:latest | |
| # docker build . --file SecurityServiceTestUI/Dockerfile --tag securityservicetestui:latest | |
| # - name: Run Integration Tests (UI Chrome) | |
| # env: | |
| # Browser: Chrome | |
| # run: | | |
| # dotnet test "SecurityService.OpenIdConnect.IntegrationTests\SecurityService.OpenIdConnect.IntegrationTests.csproj" --filter Category=PRTest | |
| # - uses: actions/[email protected] | |
| # if: ${{ failure() }} | |
| # with: | |
| # name: chromelogs | |
| # path: /home/txnproc/trace/ | |
| # - uses: dacbd/create-issue-action@main | |
| # if: ${{ failure() }} | |
| # name: Create an issue on build failure | |
| # with: | |
| # title: Investigate Nightly Build Failure - Chrome UI | |
| # token: ${{secrets.GITHUB_TOKEN}} | |
| # labels: nightlybuild | |
| # body: Url is ${{env.action_url}} | |
| # buildedgeui: | |
| # name: "Nightly Build - Edge UI" | |
| # env: | |
| # ASPNETCORE_ENVIRONMENT: "Production" | |
| # runs-on: ubuntu-latest | |
| # steps: | |
| # - uses: actions/[email protected] | |
| # - name: Set Up Variables | |
| # run: echo "action_url=$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID" >> $GITHUB_ENV | |
| # - name: Trust Root Certificate | |
| # run: | | |
| # certPath="$GITHUB_WORKSPACE/Certificates/aspnetapp-root-cert.pfx" | |
| # password="password" | |
| # openssl pkcs12 -in "$certPath" -out temp.pem -nodes -password "pass:$password" | |
| # sudo cp temp.pem /usr/local/share/ca-certificates/aspnetapp-root-cert.crt | |
| # sudo update-ca-certificates | |
| # - name: Trust Certificate | |
| # run: | | |
| # certPath="$GITHUB_WORKSPACE/Certificates/aspnetapp-web-api.pfx" | |
| # password="password" | |
| # openssl pkcs12 -in "$certPath" -out temp.pem -nodes -password "pass:$password" | |
| # sudo cp temp.pem /usr/local/share/ca-certificates/aspnetapp-web-api.crt | |
| # sudo update-ca-certificates | |
| # - name: Install NET 9 | |
| # uses: actions/[email protected] | |
| # with: | |
| # dotnet-version: '9.0.x' | |
| # - name: Restore Nuget Packages | |
| # run: dotnet restore SecurityService.sln --source ${{ secrets.PUBLICFEEDURL }} --source ${{ secrets.PRIVATEFEED_URL }} | |
| # - name: Build Code | |
| # run: dotnet build SecurityService.sln --configuration Release | |
| # - name: Build Docker Images | |
| # run: | | |
| # docker build . --file SecurityService/Dockerfile --tag securityservice:latest | |
| # docker build . --file SecurityServiceTestUI/Dockerfile --tag securityservicetestui:latest | |
| # - name: Run Integration Tests (UI Edge) | |
| # env: | |
| # Browser: Edge | |
| # DriverPath: C:\\SeleniumWebDrivers\\EdgeDriver\\ | |
| # DriverExe: msedgedriver.exe | |
| # run: | | |
| # dotnet test "SecurityService.OpenIdConnect.IntegrationTests\SecurityService.OpenIdConnect.IntegrationTests.csproj" --filter Category=PRTest | |
| # - uses: actions/[email protected] | |
| # if: ${{ failure() }} | |
| # with: | |
| # name: edgelogs | |
| # path: /home/txnproc/trace/ | |
| # - uses: dacbd/create-issue-action@main | |
| # if: ${{ failure() }} | |
| # name: Create an issue on build failure | |
| # with: | |
| # title: Investigate Nightly Build Failure - Edge UI | |
| # token: ${{secrets.GITHUB_TOKEN}} | |
| # labels: nightlybuild | |
| # body: Url is ${{env.action_url}} | |
| codecoverage: | |
| name: "Nightly Build - Code Coverage" | |
| env: | |
| ASPNETCORE_ENVIRONMENT: "Production" | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/[email protected] | |
| - name: Install NET 9 | |
| uses: actions/[email protected] | |
| with: | |
| dotnet-version: '9.0.x' | |
| - name: Restore Nuget Packages | |
| run: dotnet restore SecurityService.sln --source ${{ secrets.PUBLICFEEDURL }} --source ${{ secrets.PRIVATEFEED_URL }} | |
| - name: Build Code | |
| run: dotnet build SecurityService.sln --configuration Release | |
| - name: Run Unit Tests | |
| run: | | |
| echo "ASPNETCORE_ENVIRONMENT are > ${ASPNETCORE_ENVIRONMENT}" | |
| dotnet test "SecurityService.UnitTests\SecurityService.UnitTests.csproj" /p:ExcludeByFile="\SecurityService\Views\**\*.cshtml" /p:CollectCoverage=true /p:Exclude="[xunit*]*" /p:ExcludeByAttribute="Obsolete" /p:ExcludeByAttribute="GeneratedCodeAttribute" /p:ExcludeByAttribute="CompilerGeneratedAttribute" /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 |