Skip to content

Commit

Permalink
Release/3.0.5
Browse files Browse the repository at this point in the history
  • Loading branch information
bryan-robitaille authored May 10, 2023
2 parents 805fcd1 + 3bec442 commit 677e55d
Show file tree
Hide file tree
Showing 129 changed files with 1,751 additions and 1,459 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG VARIANT=16@sha256:c94897fb8f81904dff61bc9e2f25eb66124c3b802afeb3f3ee48f82a3986fe64@sha256:b35e76ba744a975b9a5428b6c3cde1a1cf0be53b246e1e9a4874f87034222b5a@sha256:b35e76ba744a975b9a5428b6c3cde1a1cf0be53b246e1e9a4874f87034222b5a
ARG VARIANT=16@sha256:550f484fc5f314b575f5e397c9e2c71d7f218e59729fcda9ffa7ea1fc825dce7@sha256:b35e76ba744a975b9a5428b6c3cde1a1cf0be53b246e1e9a4874f87034222b5a@sha256:b35e76ba744a975b9a5428b6c3cde1a1cf0be53b246e1e9a4874f87034222b5a

FROM node:${VARIANT}

Expand Down
2 changes: 1 addition & 1 deletion .devcontainer/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ services:

redis:
restart: unless-stopped
image: redis:latest@sha256:93a5ed8cdfa909a12cb41e5605c147756b804a9fe38376f8afed133f427ea828
image: redis:latest@sha256:ea30bef6a1424d032295b90db20a869fc8db76331091543b7a80175cede7d887
ports:
- "6379:6379"
expose:
Expand Down
19 changes: 11 additions & 8 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,7 @@ module.exports = {
overrides: [
{
files: ["*.{ts,tsx}"],
extends: [
"plugin:@typescript-eslint/recommended",
"plugin:jsx-a11y/recommended",
"plugin:prettier/recommended",
"prettier",
],
extends: ["plugin:@typescript-eslint/recommended"],

parser: "@typescript-eslint/parser",
parserOptions: {
Expand All @@ -18,6 +13,15 @@ module.exports = {
"@typescript-eslint/await-thenable": "error",
},
},
{
files: ["*.cy.{ts,tsx}", "cypress/**/*.{ts,tsx,js,jsx}", "cypress.config.ts"],
parser: "@typescript-eslint/parser",
parserOptions: {
project: ["./cypress/tsconfig.json"],
},
extends: ["plugin:@typescript-eslint/recommended", "plugin:cypress/recommended"],
plugins: ["@typescript-eslint", "prettier", "cypress"],
},
],
env: {
browser: true,
Expand All @@ -30,7 +34,6 @@ module.exports = {
"plugin:react/recommended",
"plugin:react-hooks/recommended",
"plugin:jsx-a11y/recommended",
"plugin:cypress/recommended",
"plugin:prettier/recommended",
"plugin:@next/next/recommended",
"prettier",
Expand All @@ -47,7 +50,7 @@ module.exports = {
version: "detect",
},
},
plugins: ["react", "jsx-a11y", "prettier", "cypress"],
plugins: ["react", "jsx-a11y", "prettier"],
rules: {
"prettier/prettier": "error",
"no-console": "error",
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@b2c19fb9a2a485599ccf4ed5d65527d94bc57226 # v2.3.0
uses: github/codeql-action/init@f3feb00acb00f31a6f60280e6ace9ca31d91c76a # v2.3.2
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
Expand All @@ -42,7 +42,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@b2c19fb9a2a485599ccf4ed5d65527d94bc57226 # v2.3.0
uses: github/codeql-action/autobuild@f3feb00acb00f31a6f60280e6ace9ca31d91c76a # v2.3.2

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
Expand All @@ -56,4 +56,4 @@ jobs:
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@b2c19fb9a2a485599ccf4ed5d65527d94bc57226 # v2.3.0
uses: github/codeql-action/analyze@f3feb00acb00f31a6f60280e6ace9ca31d91c76a # v2.3.2
10 changes: 7 additions & 3 deletions .github/workflows/cypress.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,20 +50,22 @@ jobs:
id: yarn-cache-dir-path
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT

- uses: actions/cache@v3
- uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
key: linux-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
linux-yarn-
- name: "Install dependencies"
run: yarn install:all

- name: Cypress Tests
uses: cypress-io/github-action@d79d2d530a66e641eb4a5f227e13bc985c60b964 # v4.2.2
with:
# we have already installed all dependencies above
install: false
browser: chrome
headed: false
build: yarn build:test
Expand All @@ -73,6 +75,8 @@ jobs:
- name: Cypress Component Tests
uses: cypress-io/github-action@d79d2d530a66e641eb4a5f227e13bc985c60b964 # v4.2.2
with:
# we have already installed all dependencies above
install: false
browser: chrome
component: true
headed: false
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/docker-vulnerability-scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@ jobs:
steps:
- name: Configure Staging AWS credentials
id: aws-form-viewer
uses: aws-actions/configure-aws-credentials@82ea2d2853906c3fe78152101e590fa6caeb5f82
uses: aws-actions/configure-aws-credentials@580afbba8076b302fad6220e95a3a845f32b165a
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ca-central-1

- name: Login to Staging Amazon ECR
id: login-ecr-staging
uses: aws-actions/amazon-ecr-login@a1d6e39e3457a150e0fff2455c74032ceeff69a6
uses: aws-actions/amazon-ecr-login@b97dae3ef66534f4a36bd521c0cc6ffc1e49ca50

- name: Docker vulnerability scan
uses: cds-snc/security-tools/.github/actions/docker-scan@cfec0943e40dbb78cee115bbbe89dc17f07b7a0f # v2.1.3
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/eslint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ jobs:
id: yarn-cache-dir-path
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT

- uses: actions/cache@v3
- uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
key: linux-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
linux-yarn-
- name: "Install dependencies"
run: yarn install:all
Expand All @@ -51,13 +51,13 @@ jobs:
id: yarn-cache-dir-path
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT

- uses: actions/cache@v3
- uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
key: linux-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
linux-yarn-
- name: "Install dependencies"
run: yarn install:all --prefer-offline
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/jest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,16 @@ jobs:
id: yarn-cache-dir-path
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT

- uses: actions/cache@v3
- uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
key: linux-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
linux-yarn-
- name: "Install dependencies"
run: yarn install:all

- name: Jest Tests
run: yarn test --coverage
run: yarn test
4 changes: 2 additions & 2 deletions .github/workflows/prod-build-push-container.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,15 @@ jobs:
- name: Configure Production AWS credentials
id: aws-form-viewer
uses: aws-actions/configure-aws-credentials@82ea2d2853906c3fe78152101e590fa6caeb5f82
uses: aws-actions/configure-aws-credentials@580afbba8076b302fad6220e95a3a845f32b165a
with:
aws-access-key-id: ${{ secrets.PROD_AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.PROD_AWS_SECRET_ACCESS_KEY }}
aws-region: ca-central-1

- name: Login to Production Amazon ECR
id: login-ecr-production
uses: aws-actions/amazon-ecr-login@a1d6e39e3457a150e0fff2455c74032ceeff69a6
uses: aws-actions/amazon-ecr-login@b97dae3ef66534f4a36bd521c0cc6ffc1e49ca50

- name: Tag Images for Production
env:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/staging-build-push-container.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,15 @@ jobs:
- name: Configure Staging AWS credentials
id: aws-form-viewer
uses: aws-actions/configure-aws-credentials@82ea2d2853906c3fe78152101e590fa6caeb5f82
uses: aws-actions/configure-aws-credentials@580afbba8076b302fad6220e95a3a845f32b165a
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ca-central-1

- name: Login to Staging Amazon ECR
id: login-ecr-staging
uses: aws-actions/amazon-ecr-login@a1d6e39e3457a150e0fff2455c74032ceeff69a6
uses: aws-actions/amazon-ecr-login@b97dae3ef66534f4a36bd521c0cc6ffc1e49ca50

- name: Tag Images for Staging
env:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/staging-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:

- name: Configure AWS credentials
# v1 as of Jan 28 2021
uses: aws-actions/configure-aws-credentials@82ea2d2853906c3fe78152101e590fa6caeb5f82
uses: aws-actions/configure-aws-credentials@580afbba8076b302fad6220e95a3a845f32b165a
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
Expand All @@ -35,7 +35,7 @@ jobs:
- name: Login to Amazon ECR
id: login-ecr
# v1 as of Jan 28 2021
uses: aws-actions/amazon-ecr-login@a1d6e39e3457a150e0fff2455c74032ceeff69a6
uses: aws-actions/amazon-ecr-login@b97dae3ef66534f4a36bd521c0cc6ffc1e49ca50

- name: Get Cluster Name
id: cluster
Expand Down Expand Up @@ -67,7 +67,7 @@ jobs:
- name: Deploy image for Form Viewer
timeout-minutes: 10
# v1.4.11
uses: aws-actions/amazon-ecs-deploy-task-definition@290c43e7b1deae23e799b76e42b5cfcbc2f8f4cb
uses: aws-actions/amazon-ecs-deploy-task-definition@68ea58cf6c1f592af588267ee8f6084284e95a86
with:
task-definition: ${{ steps.taskdef-form-viewer.outputs.task-definition }}
service: form-viewer
Expand Down
Empty file removed Agent
Empty file.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,16 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [3.0.5] 2023-05-10

### Fixed

- Download API will not override a response status that is different than `New`. [2052](https://github.com/cds-snc/platform-forms-client/issues/2052)
- Language Toggle
- Button styling across the product
- Error message when a user tries to login and the service is unavailable
- Unsupported browser page / Java Script not enable page

## [3.0.4] 2023-05-05

### Fixed
Expand Down
8 changes: 4 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:16@sha256:e64998c9e7912aa74647c1d8779cea6dc7ff017327265fb6855522270eab80e4
FROM node:16@sha256:550f484fc5f314b575f5e397c9e2c71d7f218e59729fcda9ffa7ea1fc825dce7

ENV NODE_ENV=production

Expand All @@ -15,19 +15,19 @@ RUN yarn install --silent --production=false
RUN yarn build
RUN yarn install --production

FROM node:16@sha256:e64998c9e7912aa74647c1d8779cea6dc7ff017327265fb6855522270eab80e4
FROM node:16@sha256:550f484fc5f314b575f5e397c9e2c71d7f218e59729fcda9ffa7ea1fc825dce7

COPY migrations /src
WORKDIR /src
RUN yarn install --silent

FROM node:16@sha256:e64998c9e7912aa74647c1d8779cea6dc7ff017327265fb6855522270eab80e4
FROM node:16@sha256:550f484fc5f314b575f5e397c9e2c71d7f218e59729fcda9ffa7ea1fc825dce7

COPY flag_initialization /src
WORKDIR /src
RUN yarn install --silent

FROM node:16@sha256:e64998c9e7912aa74647c1d8779cea6dc7ff017327265fb6855522270eab80e4
FROM node:16@sha256:550f484fc5f314b575f5e397c9e2c71d7f218e59729fcda9ffa7ea1fc825dce7
LABEL maintainer="-"

ARG GOOGLE_CLIENT_ID
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.0.4
3.0.5
1 change: 1 addition & 0 deletions __tests__/api/acceptable-use.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ describe("Test acceptable use endpoint", () => {
email: "[email protected]",
name: "forms user",
privileges: [],
acceptableUse: false,
},
};

Expand Down
Loading

0 comments on commit 677e55d

Please sign in to comment.