Skip to content

Commit

Permalink
Merge branch 'develop' into issue-17670-replace-typography-with-text
Browse files Browse the repository at this point in the history
  • Loading branch information
georgewrmarshall authored Jun 23, 2023
2 parents 8adebc9 + fc2402d commit 0edc0ce
Show file tree
Hide file tree
Showing 112 changed files with 2,571 additions and 14,533 deletions.
58 changes: 46 additions & 12 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,16 @@ workflows:
- test-yarn-dedupe:
requires:
- prep-deps
- validate-lavamoat-config:
filters:
branches:
only:
- /^Version-v(\d+)[.](\d+)[.](\d+)|master/
- validate-lavamoat-allow-scripts:
requires:
- prep-deps
- validate-lavamoat-policy-build:
requires:
- prep-deps
- validate-lavamoat-policy-webapp:
matrix:
parameters:
build-type: [main, beta, flask, mmi, desktop]
requires:
- prep-deps
- prep-build:
Expand Down Expand Up @@ -162,7 +167,9 @@ workflows:
- prep-build-flask
- all-tests-pass:
requires:
- validate-lavamoat-config
- validate-lavamoat-allow-scripts
- validate-lavamoat-policy-build
- validate-lavamoat-policy-webapp
- test-lint
- test-lint-shellcheck
- test-lint-lockfile
Expand Down Expand Up @@ -329,20 +336,47 @@ jobs:
- node_modules
- build-artifacts

validate-lavamoat-config:
validate-lavamoat-allow-scripts:
executor: node-browsers-medium-plus
steps:
- checkout
- attach_workspace:
at: .
- run:
name: Validate allow-scripts config
command: |
.circleci/scripts/validate-allow-scripts.sh
command: yarn allow-scripts auto
- run:
name: Validate LavaMoat policy
command: |
.circleci/scripts/validate-lavamoat-policy.sh
name: Check working tree
command: .circleci/scripts/check-working-tree.sh

validate-lavamoat-policy-build:
executor: node-browsers-medium-plus
steps:
- checkout
- attach_workspace:
at: .
- run:
name: Validate LavaMoat build policy
command: yarn lavamoat:build:auto
- run:
name: Check working tree
command: .circleci/scripts/check-working-tree.sh

validate-lavamoat-policy-webapp:
executor: node-browsers-medium-plus
parameters:
build-type:
type: string
steps:
- checkout
- attach_workspace:
at: .
- run:
name: Validate LavaMoat << parameters.build-type >> policy
command: yarn lavamoat:webapp:auto:ci '--build-types=<< parameters.build-type >>'
- run:
name: Check working tree
command: .circleci/scripts/check-working-tree.sh

prep-build:
executor: node-browsers-medium-plus
Expand Down
11 changes: 11 additions & 0 deletions .circleci/scripts/check-working-tree.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/usr/bin/env bash

set -e
set -u
set -o pipefail

if ! git diff --exit-code
then
echo "Working tree dirty"
exit 1
fi
4 changes: 2 additions & 2 deletions .circleci/scripts/chrome-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ set -o pipefail
sudo apt-get update

# To get the latest version, see <https://www.ubuntuupdates.org/ppa/google_chrome?dist=stable>
CHROME_VERSION='111.0.5563.64-1'
CHROME_VERSION='114.0.5735.133-1'
CHROME_BINARY="google-chrome-stable_${CHROME_VERSION}_amd64.deb"
CHROME_BINARY_URL="https://dl.google.com/linux/chrome/deb/pool/main/g/google-chrome-stable/${CHROME_BINARY}"

# To retrieve this checksum, run the `wget` and `shasum` commands below
CHROME_BINARY_SHA512SUM='bbfd436c17d6f0554b91211ecf1324aeeac012f1d000d610f93956dbfb8387c0adb56f921c5b7bcc1833c49ab2abbd3bbc250001f650b3ca4f79cebe708c29ae'
CHROME_BINARY_SHA512SUM='0b1a18c44efb72ed3e69a5f78419ff5fa973df42b18a8becfcc3d4f6825957c637e9396d07756f910f2d9c7c85a3e2b64cc30cca18182ae8811feadd609f159d'

wget -O "${CHROME_BINARY}" -t 5 "${CHROME_BINARY_URL}"

Expand Down
15 changes: 0 additions & 15 deletions .circleci/scripts/validate-allow-scripts.sh

This file was deleted.

15 changes: 0 additions & 15 deletions .circleci/scripts/validate-lavamoat-policy.sh

This file was deleted.

4 changes: 0 additions & 4 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,6 @@ module.exports = {
excludedFiles: [
'app/scripts/controllers/app-state.test.js',
'app/scripts/controllers/mmi-controller.test.js',
'app/scripts/controllers/network/**/*.test.js',
'app/scripts/controllers/permissions/**/*.test.js',
'app/scripts/lib/**/*.test.js',
'app/scripts/migrations/*.test.js',
Expand Down Expand Up @@ -267,9 +266,6 @@ module.exports = {
'**/__snapshots__/*.snap',
'app/scripts/controllers/app-state.test.js',
'app/scripts/controllers/mmi-controller.test.js',
'app/scripts/controllers/network/**/*.test.js',
'app/scripts/controllers/network/**/*.test.ts',
'app/scripts/controllers/network/provider-api-tests/*.ts',
'app/scripts/controllers/permissions/**/*.test.js',
'app/scripts/lib/**/*.test.js',
'app/scripts/migrations/*.test.js',
Expand Down
7 changes: 2 additions & 5 deletions .github/workflows/add-release-label.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,16 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '16'
node-version-file: '.nvmrc'

- name: Install dependencies
run: yarn --immutable

- name: Set execute permissions for script
run: chmod +x ./development/get-next-semver-version.sh

- name: Get the next semver version
id: get-next-semver-version
env:
FORCE_NEXT_SEMVER_VERSION: ${{ vars.FORCE_NEXT_SEMVER_VERSION }}
run: ./development/get-next-semver-version.sh $FORCE_NEXT_SEMVER_VERSION
run: ./development/get-next-semver-version.sh "$FORCE_NEXT_SEMVER_VERSION"

- name: Add release label to PR and linked issues
id: add-release-label-to-pr-and-linked-issues
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/fitness-functions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ jobs:
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: '16'
node-version-file: '.nvmrc'

- name: Install dependencies
run: yarn
run: yarn --immutable

- name: Run fitness functions
env:
Expand All @@ -31,4 +31,4 @@ jobs:
# files in the current directory and its subdirectories. The output is
# then saved to a file called "diff".
git diff "$(git merge-base "origin/$BASE_REF" HEAD)" HEAD -- . > ./diff
npm run fitness-functions -- "ci" "./diff"
npm run fitness-functions -- "ci" "./diff"
45 changes: 45 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Main

on:
push:
branches: [develop, master]
pull_request:

jobs:
check-workflows:
name: Check workflows
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Download actionlint
id: download-actionlint
run: bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/7fdc9630cc360ea1a469eed64ac6d78caeda1234/scripts/download-actionlint.bash) 1.6.23
shell: bash
- name: Check workflow files
run: ${{ steps.download-actionlint.outputs.executable }} -color
shell: bash

all-jobs-completed:
name: All jobs completed
runs-on: ubuntu-latest
needs:
- check-workflows
outputs:
PASSED: ${{ steps.set-output.outputs.PASSED }}
steps:
- name: Set PASSED output
id: set-output
run: echo "PASSED=true" >> "$GITHUB_OUTPUT"

all-jobs-pass:
name: All jobs pass
if: ${{ always() }}
runs-on: ubuntu-latest
needs: all-jobs-completed
steps:
- name: Check that all jobs have passed
run: |
passed="${{ needs.all-jobs-completed.outputs.PASSED }}"
if [[ $passed != "true" ]]; then
exit 1
fi
43 changes: 43 additions & 0 deletions .github/workflows/remove-labels-after-pr-closed.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Remove labels after issue (or PR) closed

on:
issues:
types: [closed]
pull_request:
types: [closed]

jobs:
cleanup:
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write

steps:
- name: Remove labels
env:
REPO: ${{ github.repository }}
ISSUE_NUMBER: ${{ github.event.issue.number || github.event.pull_request.number }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

run: |
LABELS=(
"product-backlog"
"needs-design"
"design-in-progress"
"ready-for-dev"
"sprint-backlog"
"in-progress"
"blocked"
"needs-dev-review"
"needs-qa"
"issues-found"
"ready-for-release"
)
for LABEL in "${LABELS[@]}"; do
curl \
-X DELETE \
-H "Authorization: token $GITHUB_TOKEN" \
-H "Accept: application/vnd.github.v3+json" \
"https://api.github.com/repos/$REPO/issues/$ISSUE_NUMBER/labels/$LABEL"
done
Loading

0 comments on commit 0edc0ce

Please sign in to comment.