Skip to content

Commit

Permalink
chore(front): updates and patches frontend dependencies (#697)
Browse files Browse the repository at this point in the history
closes #680
  • Loading branch information
dgrebb authored Sep 26, 2023
1 parent b3cb56b commit 4a25356
Show file tree
Hide file tree
Showing 22 changed files with 347 additions and 215 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/bd-fe.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ on:
required: true
DISTRIBUTION:
required: true
GH_WORKFLOW_TOKEN:
required: true

permissions:
checks: write
Expand Down Expand Up @@ -179,3 +181,29 @@ jobs:
AWS_REGION: ${{ secrets.AWS_REGION }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}

- name: Delete Previous deployments
uses: actions/github-script@v6
with:
github-token: ${{ secrets.GH_WORKFLOW_TOKEN }}
script: |
const deployments = await github.rest.repos.listDeployments({
owner: context.repo.owner,
repo: context.repo.repo,
sha: context.sha
});
await Promise.all(
deployments.data.map(async (deployment) => {
await github.rest.repos.createDeploymentStatus({
owner: context.repo.owner,
repo: context.repo.repo,
deployment_id: deployment.id,
state: 'inactive'
});
return github.rest.repos.deleteDeployment({
owner: context.repo.owner,
repo: context.repo.repo,
deployment_id: deployment.id
});
})
);
40 changes: 38 additions & 2 deletions .github/workflows/bdt-fe.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: 🚜 Build, Deploy, and Test
name: 🚜 Build, Deploy, and Test
run-name: "🚜 ${{ github.ref_name == 'main' && 'PRD' || 'STG' }} - Build, Deploy, and Test - ${{ github.event_name == 'pull_request' && format('PR #{0}: {1}', github.event.pull_request.number, github.event.pull_request.title) || format('latest {0}', github.ref_name) }}"

on:
Expand All @@ -21,7 +21,6 @@ env:
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}

jobs:

build_deploy:
name: 🚀 Build & Deploy
uses: ./.github/workflows/bd-fe.yml
Expand All @@ -47,6 +46,7 @@ jobs:
PUBLIC_ENV: ${{ secrets.PUBLIC_ENV }}
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
DISTRIBUTION: ${{ secrets.DISTRIBUTION }}
GH_WORKFLOW_TOKEN: ${{ secrets.GH_WORKFLOW_TOKEN }}

backstop:
name: 🧐 Visual Regression
Expand All @@ -70,10 +70,46 @@ jobs:
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: ${{ secrets.AWS_REGION }}
REPORTS_DISTRIBUTION: ${{ secrets.REPORTS_DISTRIBUTION }}
GH_WORKFLOW_TOKEN: ${{ secrets.GH_WORKFLOW_TOKEN }}

pagespeed:
name: 📈 Metrics
needs: build_deploy
uses: ./.github/workflows/test-psi.yml
secrets:
PSI_APIKEY: ${{ secrets.PSI_APIKEY }}
GH_WORKFLOW_TOKEN: ${{ secrets.GH_WORKFLOW_TOKEN }}

cleanup:
name: 🧹 Cleanup
needs: [build_deploy, backstop, lighthouse, pagespeed]
runs-on: ubuntu-latest
concurrency:
group: build-deploy
cancel-in-progress: true
steps:
- name: Delete Previous deployments
uses: actions/github-script@v6
with:
github-token: ${{ secrets.GH_WORKFLOW_TOKEN }}
script: |
const deployments = await github.rest.repos.listDeployments({
owner: context.repo.owner,
repo: context.repo.repo,
sha: context.sha
});
await Promise.all(
deployments.data.map(async (deployment) => {
await github.rest.repos.createDeploymentStatus({
owner: context.repo.owner,
repo: context.repo.repo,
deployment_id: deployment.id,
state: 'inactive'
});
return github.rest.repos.deleteDeployment({
owner: context.repo.owner,
repo: context.repo.repo,
deployment_id: deployment.id
});
})
);
26 changes: 26 additions & 0 deletions .github/workflows/test-backstop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,3 +121,29 @@ jobs:
name: backstop-report
retention-days: 3
path: _ci/backstop/bd/

- name: Delete Previous deployments
uses: actions/github-script@v6
with:
github-token: ${{ secrets.GH_WORKFLOW_TOKEN }}
script: |
const deployments = await github.rest.repos.listDeployments({
owner: context.repo.owner,
repo: context.repo.repo,
sha: context.sha
});
await Promise.all(
deployments.data.map(async (deployment) => {
await github.rest.repos.createDeploymentStatus({
owner: context.repo.owner,
repo: context.repo.repo,
deployment_id: deployment.id,
state: 'inactive'
});
return github.rest.repos.deleteDeployment({
owner: context.repo.owner,
repo: context.repo.repo,
deployment_id: deployment.id
});
})
);
28 changes: 28 additions & 0 deletions .github/workflows/test-lighthouse.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ on:
required: true
REPORTS_DISTRIBUTION:
required: true
GH_WORKFLOW_TOKEN:
required: true

env:
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
Expand Down Expand Up @@ -97,3 +99,29 @@ jobs:
AWS_REGION: ${{ secrets.AWS_REGION }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}

- name: Delete Previous deployments
uses: actions/github-script@v6
with:
github-token: ${{ secrets.GH_WORKFLOW_TOKEN }}
script: |
const deployments = await github.rest.repos.listDeployments({
owner: context.repo.owner,
repo: context.repo.repo,
sha: context.sha
});
await Promise.all(
deployments.data.map(async (deployment) => {
await github.rest.repos.createDeploymentStatus({
owner: context.repo.owner,
repo: context.repo.repo,
deployment_id: deployment.id,
state: 'inactive'
});
return github.rest.repos.deleteDeployment({
owner: context.repo.owner,
repo: context.repo.repo,
deployment_id: deployment.id
});
})
);
30 changes: 29 additions & 1 deletion .github/workflows/test-psi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ on:
secrets:
PSI_APIKEY:
required: true
GH_WORKFLOW_TOKEN:
required: true

permissions:
checks: write
Expand All @@ -16,7 +18,7 @@ env:
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}

jobs:
lighthouse:
psi:
name: 📊 PSI
runs-on: ubuntu-latest

Expand Down Expand Up @@ -77,3 +79,29 @@ jobs:
echo "Speed Index: ${{ steps.psid.outputs.speed-index }}" >> $GITHUB_STEP_SUMMARY
echo "TTI: ${{ steps.psid.outputs.time-to-interactive }}" >> $GITHUB_STEP_SUMMARY
echo "Blocking Time: ${{ steps.psid.outputs.total-blocking-time }}" >> $GITHUB_STEP_SUMMARY
- name: Delete Previous deployments
uses: actions/github-script@v6
with:
github-token: ${{ secrets.GH_WORKFLOW_TOKEN }}
script: |
const deployments = await github.rest.repos.listDeployments({
owner: context.repo.owner,
repo: context.repo.repo,
sha: context.sha
});
await Promise.all(
deployments.data.map(async (deployment) => {
await github.rest.repos.createDeploymentStatus({
owner: context.repo.owner,
repo: context.repo.repo,
deployment_id: deployment.id,
state: 'inactive'
});
return github.rest.repos.deleteDeployment({
owner: context.repo.owner,
repo: context.repo.repo,
deployment_id: deployment.id
});
})
);
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 4a25356

Please sign in to comment.