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

Sex gender pattern updated #532

Merged
merged 39 commits into from
Jul 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
1b11dfc
Update notgovuk to 0.7.2
tomyems May 27, 2023
1c6a4da
Fix lockfile (due to incorrect merge)
tomyems May 27, 2023
903119e
Update dependencies to match notgovuk
tomyems May 27, 2023
41fed9c
Fix page due to frontend change
tomyems May 27, 2023
1187baa
Migrate tests to react-testing-library
tomyems May 28, 2023
518ebbc
Upgrade cypress
tomyems May 28, 2023
d6658b9
Remove enzyme
tomyems May 28, 2023
1eed4cf
CI: Update GitHub Actions from upstream
daniel-ac-martin Jul 10, 2023
28514c9
docs: Update runtime environments
daniel-ac-martin Jul 10, 2023
349c80e
docs: Update Cypress config
daniel-ac-martin Jul 10, 2023
cf76761
Header: Add aria-hidden to logo
daniel-ac-martin Jul 10, 2023
927ba86
Jest: Update base config
daniel-ac-martin Jul 10, 2023
d4b5868
Renovate: Update config from upstream
daniel-ac-martin Jul 10, 2023
a5c6b5d
Update dependencies
daniel-ac-martin Jul 10, 2023
53afdbf
ExpandableBanner: Stylistic changes
daniel-ac-martin Jul 10, 2023
827d3b1
Update package lock-file
daniel-ac-martin Jul 10, 2023
07aadce
docs: Listen on IPv6 by default
daniel-ac-martin Jul 10, 2023
1cf307c
Merge pull request #520 from UKHomeOffice/509-update-notgovuk
daniel-ac-martin Jul 10, 2023
bb5fc78
Update content-style-guide.tsx
sshukor Jun 30, 2023
8b28e09
[skip ci] Update built files
github-actions[bot] Jul 10, 2023
44ad598
Merge pull request #526 from UKHomeOffice/sshukor-patch-1
daniel-ac-martin Jul 10, 2023
e8faed7
[skip ci] Update built files
github-actions[bot] Jul 10, 2023
293bfac
0.4.0
github-actions[bot] Jul 10, 2023
33daf96
[skip ci] Update built files
github-actions[bot] Jul 10, 2023
5817d45
CI: Update Node.js in Drone.io
daniel-ac-martin Jul 10, 2023
bf80c58
Merge pull request #527 from UKHomeOffice/fix-drone-pipeline
daniel-ac-martin Jul 10, 2023
5958206
[skip ci] Update built files
github-actions[bot] Jul 10, 2023
073a849
CI: Add jq to Drone.io
daniel-ac-martin Jul 10, 2023
7ad78b6
Merge pull request #528 from UKHomeOffice/fix-drone-pipeline
daniel-ac-martin Jul 10, 2023
bc5bdec
[skip ci] Update built files
github-actions[bot] Jul 10, 2023
97ddcfb
CI: Add git to Drone.io
daniel-ac-martin Jul 10, 2023
ad9afe4
CI: Make kubectl executable in Drone.io
daniel-ac-martin Jul 10, 2023
6c96436
Merge pull request #529 from UKHomeOffice/fix-drone-pipeline
daniel-ac-martin Jul 10, 2023
b5b5220
[skip ci] Update built files
github-actions[bot] Jul 10, 2023
3906136
Confirm changed to confirm
sshukor Jul 11, 2023
edfadc8
Merge pull request #530 from UKHomeOffice/sshukor-patch-1
tomyems Jul 12, 2023
95823eb
[skip ci] Update built files
github-actions[bot] Jul 12, 2023
559c26f
Merge branch 'master' of github.com:UKHomeOffice/design-system into s…
tomyems Jul 14, 2023
48d00ae
Reset pnpm lock to master
tomyems Jul 14, 2023
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
13 changes: 0 additions & 13 deletions .cypress/plugins/index.js

This file was deleted.

4 changes: 3 additions & 1 deletion .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,13 @@ platform:
steps:
- name: deploy
pull: if-not-exists
image: quay.io/ukhomeofficedigital/lev-ci:3.5.1-130-e662c06959
image: node:18-alpine
commands:
- apk add -q --no-cache docker git jq make
- echo "$${DOCKER_PASSWORD}" | docker login -u "$${DOCKER_USERNAME}" --password-stdin "$${DOCKER_REGISTRY}"
- npm install -g pnpm@6.32.3
- wget -q "https://storage.googleapis.com/kubernetes-release/release/v$${KUBECTL_VERSION}/bin/linux/amd64/kubectl" -O "/usr/bin/kubectl"
- chmod +x "/usr/bin/kubectl"
- cd 'apps/docs'
- make deploy kubectl="kubectl --insecure-skip-tls-verify --server=$${KUBE_SERVER} --namespace=$${KUBE_NAMESPACE} --token=$${KUBE_TOKEN}"
environment:
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/deploy-to-heroku/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ runs:
steps:

- name: Login to Heroku
uses: AkhileshNS/heroku-deploy@v3.12.12
uses: AkhileshNS/heroku-deploy@v3.12.14
with:
heroku_api_key: ${{ inputs.heroku-api-key }}
heroku_app_name: ''
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/deploy-to-netlify/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ runs:

- id: deploy
name: Deploy
uses: nwtgck/actions-netlify@v1.2.3
uses: nwtgck/actions-netlify@v2.0.0
with:
publish-dir: "${{ inputs.app && format('apps/{0}/', inputs.app) }}pkg/netlify/publish/"
functions-dir: "${{ inputs.app && format('apps/{0}/', inputs.app) }}pkg/netlify/functions/"
Expand Down
8 changes: 4 additions & 4 deletions .github/actions/scan-app/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ runs:
TARGET: ${{ inputs.target }}
run: |
PRETTY_TARGET="${TARGET#https://}"
echo "::set-output name=write-issue::$([[ \"${GITHUB_REF#refs/heads/}\" != \"${BASELINE_BRANCH}\" ]] && echo 'false' || echo 'true')"
echo "::set-output name=fail-action::$([[ \"${GITHUB_REF#refs/heads/}\" != \"${BASELINE_BRANCH}\" ]] && echo 'true' || true)"
echo "::set-output name=prefix::${PRETTY_TARGET:-${APP}}"
echo "::set-output name=target::${TARGET:-http://localhost:8080}"
echo "write-issue=$([[ \"${GITHUB_REF#refs/heads/}\" != \"${BASELINE_BRANCH}\" ]] && echo 'false' || echo 'true')" >> ${GITHUB_OUTPUT}
echo "fail-action=$([[ \"${GITHUB_REF#refs/heads/}\" != \"${BASELINE_BRANCH}\" ]] && echo 'true' || true)" >> ${GITHUB_OUTPUT}
echo "prefix=${PRETTY_TARGET:-${APP}}" >> ${GITHUB_OUTPUT}
echo "target=${TARGET:-http://localhost:8080}" >> ${GITHUB_OUTPUT}

- name: ZAP Scan (baseline)
if: inputs.smoke
Expand Down
30 changes: 0 additions & 30 deletions .github/actions/scan-code/action.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
name: Scan code-base
description: Scans the code-base for credentials and security vulnerabilities
inputs:
token:
description: GitHub token
required: true
runs:
using: composite
steps:
Expand All @@ -13,31 +9,5 @@ runs:
with:
languages: 'javascript'

- name: Cache vdb
uses: actions/cache@v3
with:
path: |
${{ github.workspace }}/vdb
key: vdb-os_${{ runner.os }}

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2

- name: Scan
uses: ShiftLeftSecurity/scan-action@master
env:
DISABLE_TELEMETRY: 'true'
ENABLE_OSS_RISK: 'true'
FETCH_LICENSE: 'true'
VDB_HOME: ${{ github.workspace }}/vdb
WORKSPACE: https://github.com/${{ github.repository }}/blob/${{ github.sha }}
GITHUB_TOKEN: ${{ inputs.token }}
with:
type: json,yaml,serverless,dockerfile,kubernetes,depscan,bom
output: reports

- name: Upload scan reports
uses: actions/upload-artifact@master
with:
name: slscan-reports
path: reports
35 changes: 35 additions & 0 deletions .github/actions/scan-dependencies/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Scan dependencies
description: Scans the dependencies for known security vulnerabilities
inputs:
token:
description: GitHub token
required: true
runs:
using: composite
steps:

- name: Cache vdb
uses: actions/cache@v3
with:
path: |
${{ github.workspace }}/vdb
key: vdb-os_${{ runner.os }}

- name: Scan
uses: ShiftLeftSecurity/scan-action@master
env:
DISABLE_TELEMETRY: 'true'
ENABLE_OSS_RISK: 'true'
FETCH_LICENSE: 'true'
VDB_HOME: ${{ github.workspace }}/vdb
WORKSPACE: https://github.com/${{ github.repository }}/blob/${{ github.sha }}
GITHUB_TOKEN: ${{ inputs.token }}
with:
type: json,yaml,serverless,dockerfile,kubernetes,depscan,bom
output: reports

- name: Upload scan reports
uses: actions/upload-artifact@master
with:
name: slscan-reports
path: reports
8 changes: 4 additions & 4 deletions .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ inputs:
node:
description: The version of Node.js to use.
required: false
default: 16
default: 18
frozen-lockfile:
description: Whether to require a frozen lock-file
required: false
Expand All @@ -19,7 +19,7 @@ runs:
sudo update-locale LANG=${{ env.LANG }}

- name: Setup PNPM
uses: pnpm/action-setup@v2.2.2
uses: pnpm/action-setup@v2.2.4
with:
version: 6.32.3
run_install: false
Expand All @@ -40,7 +40,7 @@ runs:

- name: Pull dependencies
if: ${{ !inputs.frozen-lockfile || inputs.frozen-lockfile == 'false' }}
uses: pnpm/action-setup@v2.2.2
uses: pnpm/action-setup@v2.2.4
with:
version: 6.32.3
run_install: |
Expand All @@ -49,7 +49,7 @@ runs:

- name: Pull dependencies (frozen lock-file)
if: ${{ inputs.frozen-lockfile && inputs.frozen-lockfile != 'false' }}
uses: pnpm/action-setup@v2.2.2
uses: pnpm/action-setup@v2.2.4
with:
version: 6.32.3
run_install: true
21 changes: 18 additions & 3 deletions .github/workflows/change-assurance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,21 @@ env:
LANGUAGE: "en_GB:en"
LC_ALL: "en_GB.UTF-8"
jobs:
static-analysis:
name: Static analysis
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
steps:

- name: Checkout repository
uses: actions/checkout@v3

- name: Scan code-base
uses: ./.github/actions/scan-code

common:
name: Dependencies, Unit tests
runs-on: ubuntu-latest
Expand Down Expand Up @@ -38,7 +53,7 @@ jobs:
- name: Setup
uses: ./.github/actions/setup
with:
node: 16
node: 18

- name: Build libraries
run: npm run libs:build
Expand All @@ -59,7 +74,7 @@ jobs:
- name: Setup
uses: ./.github/actions/setup
with:
node: 16
node: 18

- name: Build
uses: ./.github/actions/build-app
Expand Down Expand Up @@ -91,7 +106,7 @@ jobs:
- name: Setup
uses: ./.github/actions/setup
with:
node: 16
node: 18

- name: Download build directory
uses: actions/download-artifact@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy-to-heroku.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ jobs:
cypress-project-id: ${{ secrets.CYPRESS_PROJECT_ID }}
cypress-record-key: ${{ secrets.CYPRESS_RECORD_KEY }}
deployment: heroku
node: 16
node: 18
smoke: true

- name: Scan service for vulnerabilities
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy-to-netlify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ jobs:
cypress-project-id: ${{ secrets.CYPRESS_PROJECT_ID }}
cypress-record-key: ${{ secrets.CYPRESS_RECORD_KEY }}
deployment: netlify
node: 16
node: 18
smoke: true

- name: Scan service for vulnerabilities
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- name: Setup
uses: ./.github/actions/setup
with:
node: 16
node: 18

- name: Push Storybook to Chromatic
uses: chromaui/action@v1
Expand All @@ -30,13 +30,14 @@ jobs:
autoAcceptChanges: master
exitZeroOnChanges: true
exitOnceUploaded: true
onlyChanged: true

deploy-docs-to-netlify:
name: Deploy to Netlify and test
uses: './.github/workflows/deploy-to-netlify.yml'
with:
app: docs
node: 16
node: 18
production-branch: master
secrets:
CYPRESS_PROJECT_ID: ${{ secrets.CYPRESS_PROJECT_ID }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- name: Setup
uses: ./.github/actions/setup
with:
node: 16
node: 18
frozen-lockfile: true

- name: Publish
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
name: 'Analysis'
name: 'Static Security Analysis'
on:
pull_request:
branches: [ 'master' ]
schedule:
- cron: '35 1 * * 2'
jobs:
Expand All @@ -18,12 +16,15 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v3

- name: Scan code-base
uses: ./.github/actions/scan-code

- name: Setup
uses: ./.github/actions/setup
with:
node: 16
node: 18

- name: Scan code-base
uses: ./.github/actions/scan-code
- name: Scan dependencies
uses: ./.github/actions/scan-dependencies
with:
token: ${{ secrets.GITHUB_TOKEN }}
20 changes: 17 additions & 3 deletions .github/workflows/update-built-files.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ jobs:
- name: Setup
uses: ./.github/actions/setup
with:
node: 16
node: 18

- name: Scan code-base
uses: ./.github/actions/scan-code
- name: Scan dependencies
uses: ./.github/actions/scan-dependencies
with:
token: ${{ secrets.GITHUB_TOKEN }}

Expand All @@ -31,3 +31,17 @@ jobs:
with:
baseline-branch: 'master'

static-analysis:
name: Static analysis
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
steps:

- name: Checkout repository
uses: actions/checkout@v3

- name: Scan code-base
uses: ./.github/actions/scan-code
6 changes: 0 additions & 6 deletions .jest/setup/enzyme.js

This file was deleted.

4 changes: 2 additions & 2 deletions apps/docs/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:16-alpine
FROM node:18-alpine

RUN apk add --no-cache ca-certificates \
&& apk upgrade --no-cache \
Expand All @@ -15,7 +15,7 @@ COPY package.json /app/
COPY dist/ /app/dist/

USER 31337
ENV LISTEN_HOST="0.0.0.0" \
ENV LISTEN_HOST="::" \
LISTEN_PORT="8080" \
SSR_ONLY="false" \
SESSIONS_SECRET="changeme" \
Expand Down
2 changes: 1 addition & 1 deletion apps/docs/aws.serverless.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
service: docs
provider:
name: aws
runtime: nodejs16.x
runtime: nodejs18.x
environment:
MODE: serverless
NODE_ENV: production
Expand Down
6 changes: 6 additions & 0 deletions apps/docs/cypress.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { defineConfig } from 'cypress';
import projectConfig from '../../cypress.config.mjs';

export default defineConfig({
...projectConfig
});
3 changes: 0 additions & 3 deletions apps/docs/cypress.json

This file was deleted.

Loading