Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/Development' into feature/tag-fi…
Browse files Browse the repository at this point in the history
…ltering
simonjfirth committed Aug 19, 2024
2 parents bee55e3 + 3cfeb18 commit fdf6264
Showing 3 changed files with 91 additions and 5 deletions.
85 changes: 85 additions & 0 deletions .github/workflows/code-pr-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
name: Code PR Check

on:
pull_request:
branches: ["main", "Development"]
paths:
- "src/**"
- "tests/**"
- ".github/workflows/code-pr-check.yml"

concurrency:
group: "${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}"
cancel-in-progress: true

env:
DOTNET_VERSION: '8.0.x'

jobs:
build-test-web-app:
name: Build and run unit tests
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ env.DOTNET_VERSION }}
cache: false

- name: Install dotnet coverage
run: dotnet tool install --global dotnet-coverage --version 17.9.3

- name: Cache SonarCloud packages
uses: actions/cache@v4
with:
path: ~\sonar\cache
key: ${{ runner.os }}-sonar
restore-keys: ${{ runner.os }}-sonar

- name: Install SonarCloud scanners
run: dotnet tool install --global dotnet-sonarscanner

- name: Install latest JDK
uses: actions/setup-java@v4
with:
distribution: "microsoft"
java-version: "17"

# - name: Start SonarCloud scanner
# run: |
# dotnet-sonarscanner begin \
# /k:"DFE-Digital_sts-content-support" \
# /o:"dfe-digital" \
# /d:sonar.login="${{ secrets.SONAR_TOKEN }}" \
# /d:sonar.host.url="https://sonarcloud.io" \
# /d:sonar.cs.vscoveragexml.reportsPaths=coverage.xml \
# /d:sonar.coverage.exclusions=**/Program.cs,**/wwwroot/** \
# /d:sonar.issue.ignore.multicriteria=e1 \
# /d:sonar.issue.ignore.multicriteria.e1.ruleKey=csharpsquid:S6602 \
# /d:sonar.issue.ignore.multicriteria.e1.resourceKey=src/**/*.cs

- name: Build web app
uses: ./.github/actions/build-dotnet-app
with:
dotnet_version: ${{ env.DOTNET_VERSION }}
solution_filename: sts-contentsupport.sln

- name: Run unit tests
uses: ./.github/actions/run-unit-tests
with:
solution_filename: sts-contentsupport.sln

# - name: Merge test results
# run: dotnet-coverage merge -f xml -o "coverage.xml" -s "coverage.settings.xml" -r coverage.cobertura.xml
#
# - name: End SonarCloud Scanner
# run: dotnet-sonarscanner end /d:sonar.login="${{ secrets.SONAR_TOKEN }}"
#
# - name: Archive code coverage results
# uses: actions/upload-artifact@v4
# with:
# name: code-coverage-report
# path: coverage.xml
#
8 changes: 4 additions & 4 deletions .github/workflows/matrix-deploy.yml
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@ name: Multi stage build & deploy
on:
workflow_dispatch:
push:
branches: ["main", "development"]
branches: [ "main", "Development" ]
paths:
- "src/**"
- ".github/workflows/matrix-deploy.yml"
@@ -37,20 +37,20 @@ jobs:
checked-out-sha: ${{ needs.set-env.outputs.checked-out-sha }}

create-and-tag-release:
needs: [set-env, create-and-publish-image]
needs: [ set-env, create-and-publish-image ]
name: Create & Tag Release
uses: ./.github/workflows/create-tag-release.yml
secrets: inherit


deploy-to-dev:
needs: [set-env, create-and-publish-image]
needs: [ set-env, create-and-publish-image ]
name: Deployment to Dev & Test
strategy:
max-parallel: 1
fail-fast: true
matrix:
target: [Dev]
target: [ Dev ]
uses: ./.github/workflows/deploy-image.yml
with:
environment: ${{ matrix.target }}
3 changes: 2 additions & 1 deletion src/Dfe.ContentSupport.Web/Views/Shared/_BetaHeader.cshtml
Original file line number Diff line number Diff line change
@@ -3,7 +3,8 @@
@* <govuk-phase-banner-tag>Beta</govuk-phase-banner-tag> *@
<strong class="govuk-tag govuk-phase-banner__content__tag">Beta</strong>
This is a new service - your
<a href="" class="govuk-link" target="_blank" rel="noopener">
<a href="https://forms.office.com/e/Jk5PuNWvGe" class="govuk-link" target="_blank"
rel="noopener">
feedback
</a> will
help us to improve it.

0 comments on commit fdf6264

Please sign in to comment.