Skip to content

Commit

Permalink
Merge pull request #606 from DFE-Digital/next
Browse files Browse the repository at this point in the history
Pathways content handling
  • Loading branch information
mattb-hippo authored Jan 10, 2025
2 parents 19cfb32 + b547539 commit 22e5bd6
Show file tree
Hide file tree
Showing 55 changed files with 2,039 additions and 71 deletions.
10 changes: 10 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
version: 2
updates:

- package-ecosystem: github-actions
directory: /
schedule:
interval: 'daily'
labels:
- github-actions
- dependabot
12 changes: 6 additions & 6 deletions .github/workflows/app-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,26 +31,26 @@ jobs:
run: docker pull ghcr.io/dfe-digital/childrens-social-care-cpd:${{inputs.tag}}

- name: Sign in to Azure
uses: azure/login@v1
uses: azure/login@v2
with:
creds: '{"clientId":"${{ secrets.TF_ARM_CLIENT_ID }}","clientSecret":"${{ secrets.TF_ARM_CLIENT_SECRET }}","subscriptionId":"${{ secrets.TF_ARM_SUBSCRIPTION_ID }}","tenantId":"${{ secrets.TF_ARM_TENANT_ID }}"}'

- name: Deploy Dev to Azure Web App
uses: azure/webapps-deploy@v2
uses: azure/webapps-deploy@v3
with:
app-name: 's185d01-chidrens-social-care-cpd-app-service'
images: 'ghcr.io/dfe-digital/childrens-social-care-cpd:${{ inputs.tag }}'
if: ${{ inputs.workspace == 'Dev' }}

- name: Deploy Test to Azure Web App
uses: azure/webapps-deploy@v2
uses: azure/webapps-deploy@v3
with:
app-name: 's185d02-chidrens-social-care-cpd-app-service'
images: 'ghcr.io/dfe-digital/childrens-social-care-cpd:${{ inputs.tag }}'
if: ${{ inputs.workspace == 'Test' }}

- name: Deploy Load-Test to Azure Web App
uses: azure/webapps-deploy@v2
uses: azure/webapps-deploy@v3
with:
app-name: 's185d03-chidrens-social-care-cpd-app-service'
slot-name: 'staging'
Expand All @@ -62,14 +62,14 @@ jobs:
if: ${{ inputs.workspace == 'Load-Test' }}

- name: Deploy Pre-Prod to Azure Web App
uses: azure/webapps-deploy@v2
uses: azure/webapps-deploy@v3
with:
app-name: 's185t01-chidrens-social-care-cpd-app-service'
images: 'ghcr.io/dfe-digital/childrens-social-care-cpd:${{ inputs.tag }}'
if: ${{ inputs.workspace == 'Pre-Prod' }}

- name: Deploy Prod to Azure Web App
uses: azure/webapps-deploy@v2
uses: azure/webapps-deploy@v3
with:
app-name: 's185p01-chidrens-social-care-cpd-app-service'
slot-name: 'staging'
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/auto-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ jobs:
steps:

- name: Sign in to Azure
uses: azure/login@v1
uses: azure/login@v2
with:
creds: '{"clientId":"${{ secrets.TF_ARM_CLIENT_ID }}","clientSecret":"${{ secrets.TF_ARM_CLIENT_SECRET }}","subscriptionId":"${{ secrets.TF_ARM_SUBSCRIPTION_ID }}","tenantId":"${{ secrets.TF_ARM_TENANT_ID }}"}'

- name: Automatically Deploy Dev to Azure Web App
uses: azure/webapps-deploy@v2
uses: azure/webapps-deploy@v3
with:
app-name: 's185d01-chidrens-social-care-cpd-app-service'
# slot-name: 'Dev'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docker-content-regression-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
- name: Run the content regression tests
run: cd browser-tests/content-regression-tests; docker-compose up --exit-code-from content-regression-tests

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
name: Playwright report
if: always()
with:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/docker-contentful-space-export.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,13 @@ jobs:

# Workaround: https://github.com/docker/build-push-action/issues/461
- name: Setup Docker buildx
uses: docker/setup-buildx-action@79abd3f86f79a9d68a23c75a09a9a85889262adf
uses: docker/setup-buildx-action@6524bf65af31da8d45b59e8c27de4bd072b392f5

# Login against a Docker registry except on PR
# https://github.com/docker/login-action
- name: Log into registry ${{ env.REGISTRY }}
if: github.event_name != 'pull_request'
uses: docker/login-action@28218f9b04b4f3f62068d7b6ce6ca5b26e35336c
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
Expand All @@ -62,7 +62,7 @@ jobs:
# https://github.com/docker/metadata-action
- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
uses: docker/metadata-action@369eb591f429131d6889c46b94e711f089e6ca96
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}

Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/docker-contentful-space-import.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,13 @@ jobs:

# Workaround: https://github.com/docker/build-push-action/issues/461
- name: Setup Docker buildx
uses: docker/setup-buildx-action@79abd3f86f79a9d68a23c75a09a9a85889262adf
uses: docker/setup-buildx-action@6524bf65af31da8d45b59e8c27de4bd072b392f5

# Login against a Docker registry except on PR
# https://github.com/docker/login-action
- name: Log into registry ${{ env.REGISTRY }}
if: github.event_name != 'pull_request'
uses: docker/login-action@28218f9b04b4f3f62068d7b6ce6ca5b26e35336c
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
Expand All @@ -62,7 +62,7 @@ jobs:
# https://github.com/docker/metadata-action
- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
uses: docker/metadata-action@369eb591f429131d6889c46b94e711f089e6ca96
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}

Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,13 @@ jobs:

# Workaround: https://github.com/docker/build-push-action/issues/461
- name: Setup Docker buildx
uses: docker/setup-buildx-action@79abd3f86f79a9d68a23c75a09a9a85889262adf
uses: docker/setup-buildx-action@6524bf65af31da8d45b59e8c27de4bd072b392f5

# Login against a Docker registry except on PR
# https://github.com/docker/login-action
- name: Log into registry ${{ env.REGISTRY }}
if: github.event_name != 'pull_request'
uses: docker/login-action@28218f9b04b4f3f62068d7b6ce6ca5b26e35336c
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
Expand All @@ -73,7 +73,7 @@ jobs:
# https://github.com/docker/metadata-action
- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
uses: docker/metadata-action@369eb591f429131d6889c46b94e711f089e6ca96
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/load-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:

# Install the latest version of Terraform CLI
- name: Setup Terraform
uses: hashicorp/setup-terraform@v2
uses: hashicorp/setup-terraform@v3

# Initialize a new or existing Terraform working directory by creating initial files, loading any remote state, downloading modules, etc.
- name: Terraform Init
Expand Down Expand Up @@ -76,7 +76,7 @@ jobs:
pip3 install charset_normalizer
- name: Sign in to Azure
uses: azure/login@v1
uses: azure/login@v2
with:
creds: '{"clientId":"${{ secrets.TF_ARM_CLIENT_ID }}","clientSecret":"${{ secrets.TF_ARM_CLIENT_SECRET }}","subscriptionId":"${{ secrets.TF_ARM_SUBSCRIPTION_ID }}","tenantId":"${{ secrets.TF_ARM_TENANT_ID }}"}'

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/run-content-regression-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
- name: Run Playwright tests
run: npx playwright test

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
if: always()
with:
name: playwright-report
Expand Down
20 changes: 12 additions & 8 deletions .github/workflows/sonarqube.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
name: Static code analysis

on:
workflow_dispatch:
# push:
# branches: ["main", "release/**", "feature/**", "fix/**"]
pull_request:
branches:
- main
- next
types: [opened, synchronize, reopened]
branches: ["next", "main", "release/**", "feature/**", "fix/**"]

jobs:
code-analysis:
name: Static code analysis
Expand Down Expand Up @@ -52,17 +56,17 @@ jobs:

- name: Build, Test and Analyze
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN_AS }}
run: |
dotnet-sonarscanner begin \
/k:"DFE-Digital_childrens-social-care-cpd" \
/o:"dfe-digital" \
/k:as2024ad_sfsw \
/o:as2024ad \
/d:sonar.qualitygate.wait=true \
/d:sonar.cs.vscoveragexml.reportsPaths=coverage.xml \
/d:sonar.exclusions="**/*.css,**/*.scss,**/Models/*,**/Program.cs,**/WebApplicationBuilderExtensions.cs,**/GraphQL/Queries/*,**/Contentful-Schema/migrations/*.cjs" \
/d:sonar.test.exclusions="Childrens-Social-Care-CPD-Tests/**/*,Terraform-bootstrap/Error-pages/*" \
/d:sonar.token="${{ secrets.SONAR_TOKEN }}" \
/d:sonar.token="${{ secrets.SONAR_TOKEN_AS }}" \
/d:sonar.host.url="https://sonarcloud.io"
dotnet build --no-incremental
dotnet-coverage collect --settings dotnet-cover-config.xml -f xml -o coverage.xml "dotnet test"
dotnet-sonarscanner end /d:sonar.token="${{ secrets.SONAR_TOKEN }}"
dotnet-sonarscanner end /d:sonar.token="${{ secrets.SONAR_TOKEN_AS }}"
2 changes: 1 addition & 1 deletion .github/workflows/terraform-destroy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ jobs:

# Install the latest version of Terraform CLI
- name: Setup Terraform
uses: hashicorp/setup-terraform@v2
uses: hashicorp/setup-terraform@v3

# Initialize a new or existing Terraform working directory by creating initial files, loading any remote state, downloading modules, etc.
- name: Terraform Init
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/terraform-fmt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:

# Install the latest version of Terraform CLI
- name: Setup Terraform
uses: hashicorp/setup-terraform@v2
uses: hashicorp/setup-terraform@v3

# Checks that all Terraform configuration files adhere to a canonical format
- name: Terraform Format
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/terraform-plan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ jobs:

# Install the latest version of Terraform CLI
- name: Setup Terraform
uses: hashicorp/setup-terraform@v2
uses: hashicorp/setup-terraform@v3

# Initialize a new or existing Terraform working directory by creating initial files, loading any remote state, downloading modules, etc.
- name: Terraform Init
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/terraform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ jobs:

# Install the latest version of Terraform CLI
- name: Setup Terraform
uses: hashicorp/setup-terraform@v2
uses: hashicorp/setup-terraform@v3

# Initialize a new or existing Terraform working directory by creating initial files, loading any remote state, downloading modules, etc.
- name: Terraform Init
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ public class EntityResolverTests
[TestCase("linkListCard", typeof(LinkListCard))]
[TestCase("pageContents", typeof(PageContents))]
[TestCase("pageContentsItem", typeof(PageContentsItem))]
[TestCase("pathwaysModule", typeof(PathwaysModule))]
[TestCase("pathwaysModuleSection", typeof(PathwaysModuleSection))]
[TestCase("pdfFileResource", typeof(PdfFileResource))]
[TestCase("quoteBox", typeof(QuoteBox))]
[TestCase("richTextBlock", typeof(RichTextBlock))]
Expand Down
Loading

0 comments on commit 22e5bd6

Please sign in to comment.