Skip to content

Commit 0dd9b30

Browse files
authored
refactor: De-umbrella this application (#1845)
Additional changes of note: * Remove distillery in favor of native Elixir releases * Refactors the configuration files, uses `runtime.exs` now * Updates excoveralls, adds file info to coverage output * Adds a suite of smoke tests, which * Deprecates the Elixir tests which use Wallaby
1 parent e31cb32 commit 0dd9b30

File tree

4,248 files changed

+4057
-6602
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

4,248 files changed

+4057
-6602
lines changed

.dockerignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ deps
88
erl_crash.dump
99
build.sh
1010
deploy.sh
11-
apps/site/priv/static
11+
priv/static
1212
aws
13-
site-build.zip
13+
dotcom-build.zip
1414
bin
1515
Dockerfile
1616
.dockerignore

.formatter.exs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
[
22
inputs: [
33
"mix.exs",
4-
"apps/*/mix.exs",
5-
"apps/*/{config,lib,test}/**/*.{ex,exs}",
6-
"config/**/*.{ex,exs}",
4+
"{config,lib,test}/**/*.{ex,exs}",
75
"rel/**/*.{ex,exs}"
86
]
97
]

.github/CODEOWNERS

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@
44
* @mbta/dotcom
55

66
# CMS-related code
7-
/apps/cms/ @mbta/dotcom @amaisano
8-
site/content_rewriter.ex @mbta/dotcom @amaisano
9-
site/content_rewriters/ @mbta/dotcom @amaisano
10-
site_web/controllers/cms_controller.ex @mbta/dotcom @amaisano
11-
site_web/views/cms_view.ex @mbta/dotcom @amaisano
12-
site_web/views/page_content_view.ex @mbta/dotcom @amaisano
13-
site_web/views/paragraph_view.ex @mbta/dotcom @amaisano
14-
site_web/views/partial_view.ex @mbta/dotcom @amaisano
15-
site_web/views/teaser_view.ex @mbta/dotcom @amaisano
16-
site_web/views/helpers/cms_helpers.ex @mbta/dotcom @amaisano
17-
site_web/views/helpers/cms_router_helpers.ex @mbta/dotcom @amaisano
18-
site_web/templates/cms/ @mbta/dotcom @amaisano
7+
cms/ @mbta/dotcom @amaisano
8+
dotcom/content_rewriter.ex @mbta/dotcom @amaisano
9+
dotcom/content_rewriters/ @mbta/dotcom @amaisano
10+
dotcom_web/controllers/cms_controller.ex @mbta/dotcom @amaisano
11+
dotcom_web/views/cms_view.ex @mbta/dotcom @amaisano
12+
dotcom_web/views/page_content_view.ex @mbta/dotcom @amaisano
13+
dotcom_web/views/paragraph_view.ex @mbta/dotcom @amaisano
14+
dotcom_web/views/partial_view.ex @mbta/dotcom @amaisano
15+
dotcom_web/views/teaser_view.ex @mbta/dotcom @amaisano
16+
dotcom_web/views/helpers/cms_helpers.ex @mbta/dotcom @amaisano
17+
dotcom_web/views/helpers/cms_router_helpers.ex @mbta/dotcom @amaisano
18+
dotcom_web/templates/cms/ @mbta/dotcom @amaisano

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,6 @@
3232
* [ ] **Other accessibility checks** such as sufficient [color constrast](https://thinkdobecreate.com/articles/4-required-tests-before-shipping-new-features/#color-contrast), or whether the layout holds up at 200% [zoom level](https://thinkdobecreate.com/articles/4-required-tests-before-shipping-new-features/#visible-focus).
3333

3434
#### New endpoints, or non-trivial changes to current endpoints
35-
* [ ] **Have we load-tested** any new pages or internal API endpoints that will receive significant traffic? [See load testing docs](./../apps/site/load_tests/README.md)
35+
* [ ] **Have we load-tested** any new pages or internal API endpoints that will receive significant traffic? [See load testing docs](./../load_tests/README.md)
3636
* [ ] **If this change involves routes,** does it work correctly with pertinent "unusual" routes such as the combined Green Line, Silver Line, Foxboro commuter rail, and single-direction bus routes like the 170?
3737

.github/actions/build-app/action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ runs:
1414
with:
1515
path: |
1616
_build
17-
apps/site/priv
18-
apps/site/react_renderer/dist/app.js
17+
priv
18+
react_renderer/dist/app.js
1919
key: ci-application-cache-${{ github.sha }}
2020
id: build-cache
2121

.github/actions/setup-all/action.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,15 +43,15 @@ runs:
4343
- name: Restore cache of Node dependencies from package-lock.json
4444
uses: actions/cache@v3
4545
with:
46-
path: apps/site/assets/node_modules
47-
key: ci-nodejs-cache-${{ hashFiles('apps/site/assets/package-lock.json') }}
46+
path: assets/node_modules
47+
key: ci-nodejs-cache-${{ hashFiles('assets/package-lock.json') }}
4848
id: node-cache
4949

5050
- name: Restore Cypress cache
5151
uses: actions/cache@v3
5252
with:
5353
path: ~/.cache/Cypress
54-
key: ci-cypress-${{ hashFiles('apps/site/assets/package-lock.json') }}
54+
key: ci-cypress-${{ hashFiles('assets/package-lock.json') }}
5555

5656
- name: Install Node dependencies (if needed)
5757
if: ${{ steps.node-cache.outputs.cache-hit != 'true' }}

.github/dependabot.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ updates:
1212
time: "09:00"
1313
open-pull-requests-limit: 1
1414
- package-ecosystem: "npm" # See documentation for possible values
15-
directory: "/apps/site/assets" # Location of package manifests
15+
directory: "assets" # Location of package manifests
1616
schedule:
1717
interval: "daily"
1818
time: "09:00"

.github/workflows/algolia-update.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,13 @@ jobs:
2828
- uses: actions/cache/restore@v3
2929
with:
3030
path: deps
31-
key: ci-mix-cache-${{ hashFiles('**/mix.lock') }}
31+
key: ci-mix-cache-${{ hashFiles('mix.lock') }}
3232
restore-keys: ci-mix-cache-
3333
# the running application runs Webpack to render React stuff :(, so need NPM too
3434
- uses: actions/cache/restore@v3
3535
with:
36-
path: apps/site/assets/node_modules
37-
key: ci-nodejs-cache-${{ hashFiles('apps/site/assets/package-lock.json') }}
36+
path: assets/node_modules
37+
key: ci-nodejs-cache-${{ hashFiles('assets/package-lock.json') }}
3838
restore-keys: ci-nodejs-cache-
3939
- env:
4040
ALGOLIA_APP_ID: ${{ secrets.ALGOLIA_APP_ID }}

.github/workflows/changed-files.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,9 @@ jobs:
5858
echo "ex=true" >> $GITHUB_OUTPUT
5959
else
6060
changes () { git diff --name-only --diff-filter=ACDMRT ${{ github.event.pull_request.base.sha }} ${{ github.event.pull_request.head.sha }} ; }
61-
echo "js=$(changes | grep -E 'apps/site/assets/js/.*\.jsx?' | xargs)" >> $GITHUB_OUTPUT
62-
echo "ts=$(changes | grep -E 'apps/site/assets/ts/.*\.tsx?' | xargs)" >> $GITHUB_OUTPUT
63-
echo "scss=$(changes | grep -E 'apps/site/assets/css/.*\.scss' | xargs)" >> $GITHUB_OUTPUT
61+
echo "js=$(changes | grep -E 'assets/js/.*\.jsx?' | xargs)" >> $GITHUB_OUTPUT
62+
echo "ts=$(changes | grep -E 'assets/ts/.*\.tsx?' | xargs)" >> $GITHUB_OUTPUT
63+
echo "scss=$(changes | grep -E 'assets/css/.*\.scss' | xargs)" >> $GITHUB_OUTPUT
6464
echo "ex=$(changes | grep -E '.*(\.exs?|\.eex)' | xargs)" >> $GITHUB_OUTPUT
6565
fi
6666
- name: "List changed files:"

.github/workflows/tests.yml

Lines changed: 3 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -91,13 +91,13 @@ jobs:
9191
with:
9292
path: |
9393
_build
94-
apps/site/priv
95-
apps/site/react_renderer/dist/app.js
94+
priv
95+
react_renderer/dist/app.js
9696
key: ci-application-cache-${{ github.sha }}
9797
- env:
9898
RECAPTCHA_PUBLIC_KEY: 6LeIxAcTAAAAAJcZVRqyHh71UMIEGNQ_MXjiZKhI
9999
RECAPTCHA_PRIVATE_KEY: 6LeIxAcTAAAAAGG-vFI1TnRWxMZNFuojJ4WifJWe
100-
REACT_BUILD_PATH: apps/site/react_renderer/dist/app.js
100+
REACT_BUILD_PATH: react_renderer/dist/app.js
101101
run: npm run ci:unit:exunit
102102
- name: Upload coverage artifact
103103
if: ${{ always() && github.event.pull_request }}
@@ -165,25 +165,3 @@ jobs:
165165
- uses: actions/checkout@v4
166166
- uses: ./.github/actions/setup-all
167167
- run: npm run ci:format:ts
168-
169-
elixir_wallaby:
170-
name: Integration tests / Elixir
171-
runs-on: ubuntu-latest
172-
needs: [file_changes, build_app]
173-
if: ${{ needs.file_changes.outputs.any }}
174-
steps:
175-
- uses: actions/checkout@v4
176-
- uses: ./.github/actions/setup-all
177-
- uses: actions/cache/restore@v3
178-
with:
179-
path: |
180-
_build
181-
apps/site/priv
182-
apps/site/react_renderer/dist/app.js
183-
key: ci-application-cache-${{ github.sha }}
184-
- uses: mbta/setup-chromedriver@master
185-
- env:
186-
RECAPTCHA_PUBLIC_KEY: 6LeIxAcTAAAAAJcZVRqyHh71UMIEGNQ_MXjiZKhI
187-
RECAPTCHA_PRIVATE_KEY: 6LeIxAcTAAAAAGG-vFI1TnRWxMZNFuojJ4WifJWe
188-
REACT_BUILD_PATH: apps/site/react_renderer/dist/app.js
189-
run: npm run ci:integration:ex

0 commit comments

Comments
 (0)