Skip to content

Commit

Permalink
Merge pull request #304 from GSA-TTS/main
Browse files Browse the repository at this point in the history
Deploy to demo
  • Loading branch information
danielnaab authored Jan 15, 2025
2 parents 13b5d2f + faa676c commit e0a15c3
Show file tree
Hide file tree
Showing 413 changed files with 28,421 additions and 18,834 deletions.
38 changes: 38 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

**Smartphone (please complete the following information):**
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]

**Additional context**
Add any other context about the problem here.
59 changes: 59 additions & 0 deletions .github/ISSUE_TEMPLATE/risk.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
---
name: Risk
about: Document project risks
title: "[RISK]"
labels: risk
assignees: ''

---

## Title
*What is the risk we need to manage?*
<br />

## Description
*Describe the potential risk. For instance: Item A cannot be completed until Item B has been purchased but approval has been delayed, or Item A requires resources that have not been identified and the project is currently resource constrained.*

<br />


## Category

- [ ] Timeline
- [ ] Resource
- [ ] Environment
- [ ] Customer/Partner
- [ ] Regulatory or compliance
- [ ] Financial (cost/revenue)
- [ ] Regulatory or compliance
- [ ] Something else? Please suggest a category.

<br />

## Potential Impact (1 - 10)
*A quantitative rating of the potential impact on the project if the risk should materialize. Impact in a Risk Register should be scored on a scale of 1 – 10 with 10 being the highest impact.*

<br />


## Probability (1 - 10)
*The likelihood that the risk will occur at some point in the duration of the project. This should be quantitative like Potential Impact not qualitative (high, medium or low). If you use qualitative measures you cannot calculate a Risk Score, which is done by multiplying Probability and Impact and you can easily convert a number to a descriptor e.g. 1-3 = “Low”, 4-6 = “Medium” and 7-10 = “High”.*

<br />


## Risk Score (Impact x Probability)

<br />


## Likely Outcome
*The likely consequence or impact of the risk if it materializes.*

<br />


## Prevention and Mitigation
*Action plan to prevent a given risk from occurring, or contingency plans if the risk occurs.*

<br />
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/story.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ about: Suggest a user story for this product
title: ''
labels: story
assignees: ''
projects: ['GSA-TTS/17']

---

## Overview
Expand Down
16 changes: 16 additions & 0 deletions .github/ISSUE_TEMPLATE/task.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
name: Task
about: Non-code/non-design tasks
title: ''
labels: ''
assignees: ''

---

#Title


#Description/Context


#Definition of Done
2 changes: 1 addition & 1 deletion .github/workflows/_pr-create.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
id: check-pr
run: |
PR=$(gh pr list --base ${BASE} --head ${HEAD} --json number --jq '.[0].number')
echo "::set-output name=pr_exists::$PR"
echo "pr_exists=$PR" >> $GITHUB_OUTPUT
- name: Create pull request
if: steps.check-pr.outputs.pr_exists == ''
Expand Down
25 changes: 24 additions & 1 deletion .github/workflows/_terraform-apply.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ on:
deploy-env:
type: string
required: true
terraform_version:
description: Terraform version
required: false
default: "1.10.4"
type: string

env:
DEPLOY_ENV: ${{ inputs.deploy-env }}
Expand All @@ -20,7 +25,7 @@ jobs:
- name: Read node version from `.nvmrc` file
id: nvmrc
shell: bash
run: echo ::set-output name=NODE_VERSION::$(cat .nvmrc)
run: echo "NODE_VERSION=$(cat .nvmrc)" >> $GITHUB_OUTPUT

- name: Install required node.js version
uses: actions/setup-node@v3
Expand Down Expand Up @@ -50,6 +55,24 @@ jobs:
- name: Install dependencies
run: pnpm install

- uses: actions/cache@v3
name: Check Cache for Terraform CLI
id: terraform-cache
with:
path: /usr/local/bin/terraform
key: terraform-${{ inputs.terraform_version }}

- name: Install Terraform CLI
if: steps.terraform-cache.outputs.cache-hit != 'true'
run: |
sudo apt-get update && sudo apt-get install -y wget unzip
wget https://releases.hashicorp.com/terraform/${{ inputs.terraform_version }}/terraform_${{ inputs.terraform_version }}_linux_amd64.zip
unzip terraform_${{ inputs.terraform_version }}_linux_amd64.zip
sudo mv terraform /usr/local/bin/
- name: Verify Terraform Installation
run: terraform --version

- name: Initialize Terraform CDK configuration
shell: bash
working-directory: infra/cdktf
Expand Down
25 changes: 24 additions & 1 deletion .github/workflows/_terraform-plan-pr-comment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ on:
deploy-env:
required: true
type: string
terraform_version:
description: Terraform version
required: false
default: "1.10.4"
type: string

jobs:
terraform:
Expand All @@ -22,7 +27,7 @@ jobs:
- name: Read node version from `.nvmrc` file
id: nvmrc
shell: bash
run: echo ::set-output name=NODE_VERSION::$(cat .nvmrc)
run: echo "NODE_VERSION=$(cat .nvmrc)" >> $GITHUB_OUTPUT

- name: Install required node.js version
uses: actions/setup-node@v3
Expand Down Expand Up @@ -52,6 +57,24 @@ jobs:
- name: Install dependencies
run: pnpm install

- uses: actions/cache@v3
name: Check Cache for Terraform CLI
id: terraform-cache
with:
path: /usr/local/bin/terraform
key: terraform-${{ inputs.terraform_version }}

- name: Install Terraform CLI
if: steps.terraform-cache.outputs.cache-hit != 'true'
run: |
sudo apt-get update && sudo apt-get install -y wget unzip
wget https://releases.hashicorp.com/terraform/${{ inputs.terraform_version }}/terraform_${{ inputs.terraform_version }}_linux_amd64.zip
unzip terraform_${{ inputs.terraform_version }}_linux_amd64.zip
sudo mv terraform /usr/local/bin/
- name: Verify Terraform Installation
run: terraform --version

- name: Initialize Terraform CDK configuration
shell: bash
working-directory: infra/cdktf
Expand Down
62 changes: 60 additions & 2 deletions .github/workflows/_validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,17 @@ name: Validate

on:
workflow_call:
inputs:
playwright_version:
description: Installed playwright version
required: false
default: "1.48.1"
type: string
terraform_version:
description: Terraform version
required: false
default: "1.10.4"
type: string

jobs:
run-tests:
Expand All @@ -14,7 +25,7 @@ jobs:
- name: Read node version from `.nvmrc` file
id: nvmrc
shell: bash
run: echo ::set-output name=NODE_VERSION::$(cat .nvmrc)
run: echo "NODE_VERSION=$(cat .nvmrc)" >> $GITHUB_OUTPUT

- name: Install required node.js version
uses: actions/setup-node@v4
Expand Down Expand Up @@ -44,11 +55,40 @@ jobs:
- name: Install dependencies
run: pnpm install

- name: Cache Playwright binaries
uses: actions/cache@v4
id: playwright-cache
with:
path: ~/.cache/ms-playwright
key: ${{ runner.os }}-playwright-${{ inputs.playwright_version }}

- name: Install Playwright
run: pnpm dlx playwright@${{ inputs.playwright_version }} install --with-deps
if: steps.playwright-cache.outputs.cache-hit != 'true'

# While most of the test suite is self-contained, the tests for the demo
# servers require a prod build of @atj/server.
- name: Build
run: pnpm build

- name: Make directory for build artifacts
run: mkdir -p output/build-artifacts


- name: Spotlight app performance budget
run: pnpm --filter @atj/spotlight size:ci > output/build-artifacts/spotlight-size-output.txt

- name: Design package performance budget
run: pnpm --filter @atj/design size:ci > output/build-artifacts/design-size-output.txt

- name: Upload size:ci results
uses: actions/upload-artifact@v4
with:
name: size-limit-results
path: |
output/build-artifacts/spotlight-size-output.txt
output/build-artifacts/design-size-output.txt
- name: Lint source code
shell: bash
run: pnpm lint
Expand All @@ -57,10 +97,28 @@ jobs:
shell: bash
run: AUTH_SECRET=not-super-secret pnpm test:ci

- uses: actions/cache@v3
name: Check Cache for Terraform CLI
id: terraform-cache
with:
path: /usr/local/bin/terraform
key: terraform-${{ inputs.terraform_version }}

- name: Install Terraform CLI
if: steps.terraform-cache.outputs.cache-hit != 'true'
run: |
sudo apt-get update && sudo apt-get install -y wget unzip
wget https://releases.hashicorp.com/terraform/${{ inputs.terraform_version }}/terraform_${{ inputs.terraform_version }}_linux_amd64.zip
unzip terraform_${{ inputs.terraform_version }}_linux_amd64.zip
sudo mv terraform /usr/local/bin/
- name: Verify Terraform Installation
run: terraform --version

- name: Initialize Terraform CDK configuration
shell: bash
working-directory: infra/cdktf
run: |
cd infra/cdktf
pnpm cdktf get
pnpm build:tsc
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/add-terraform-plan-to-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ name: Post Terraform plan to PR comment
on:
pull_request:
branches:
- staging
- demo
- main
types:
- opened
- synchronize
- reopened

jobs:
add-terraform-plan-to-staging-pr:
add-terraform-plan-to-demo-pr:
uses: ./.github/workflows/_terraform-plan-pr-comment.yml
secrets: inherit
with:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/create-pr-to-staging.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
name: Create PR from main to staging
name: Create PR from main to demo

on:
push:
branches:
- main

jobs:
create-pr-to-staging:
create-pr-to-demo:
uses: ./.github/workflows/_pr-create.yml
secrets: inherit
with:
base: staging
base: demo
2 changes: 1 addition & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
push:
branches:
- main
- staging
- demo
workflow_dispatch:

jobs:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@ packages/form-service
/e2e/playwright-report/
/e2e/blob-report/
/e2e/playwright/.cache/
__screenshots__/
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v20.16.0
v22.12.0
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:20-bookworm AS base
FROM node:22-bookworm AS base

ENV PNPM_HOME="/pnpm"
ENV PATH="$PNPM_HOME:$PATH"
Expand Down
Loading

0 comments on commit e0a15c3

Please sign in to comment.