-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'staging' into email-template-update-mailersend
- Loading branch information
Showing
283 changed files
with
19,051 additions
and
176,138 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,50 @@ | ||
name: Process Notifications | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
environment: | ||
description: The Github environment to load secrets from | ||
type: string | ||
required: true | ||
environment: | ||
description: The Github environment to load secrets from | ||
type: string | ||
required: true | ||
force-deploy: | ||
description: Skip processing notifications if force deploy is true | ||
type: boolean | ||
required: false | ||
default: false | ||
|
||
jobs: | ||
execute-mutation: | ||
execute-process: | ||
if: ${{ inputs.force-deploy != true }} | ||
runs-on: ubuntu-latest | ||
environment: ${{ inputs.environment }} | ||
steps: | ||
- name: Call GraphQL API | ||
env: | ||
SITE_URL: ${{ vars.SITE_URL }} | ||
PROCESS_NOTIFICATIONS_SECRET: ${{ secrets.PROCESS_NOTIFICATIONS_SECRET }} | ||
run: | | ||
RESPONSE=$(curl -s -o response.json -w "%{http_code}" -X POST "$SITE_URL/api/graphql" \ | ||
-H "Content-Type: application/json" \ | ||
-H "PROCESS_NOTIFICATIONS_SECRET: $PROCESS_NOTIFICATIONS_SECRET" \ | ||
-d '{"query":"mutation { processNotifications }"}') | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
HTTP_STATUS=$RESPONSE | ||
- name: Setup Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: "20" | ||
cache: "npm" | ||
cache-dependency-path: site/gatsby-site/package-lock.json | ||
|
||
if [ "$HTTP_STATUS" -ne 200 ]; then | ||
echo "GraphQL mutation failed with HTTP status: $HTTP_STATUS" | ||
cat response.json | ||
exit 1 | ||
fi | ||
- name: Install dependencies | ||
working-directory: site/gatsby-site | ||
run: npm ci | ||
|
||
if jq -e 'has("errors") or has("errorType")' response.json > /dev/null; then | ||
echo "GraphQL mutation failed with the following response:" | ||
jq '.' response.json | ||
exit 1 | ||
fi | ||
echo "GraphQL mutation succeeded!" | ||
jq '.' response.json | ||
- name: Process Notifications | ||
working-directory: site/gatsby-site | ||
env: | ||
REALM_API_APP_ID: ${{ vars.REALM_API_APP_ID }} | ||
REALM_API_GROUP_ID: ${{ vars.REALM_API_GROUP_ID }} | ||
REALM_API_PRIVATE_KEY: ${{ secrets.REALM_API_PRIVATE_KEY }} | ||
REALM_API_PUBLIC_KEY: ${{ secrets.REALM_API_PUBLIC_KEY }} | ||
REALM_GRAPHQL_API_KEY: ${{ secrets.REALM_GRAPHQL_API_KEY }} | ||
REALM_APP_ID: ${{ vars.REALM_APP_ID }} | ||
API_MONGODB_CONNECTION_STRING: ${{ secrets.API_MONGODB_CONNECTION_STRING }} | ||
ROLLBAR_POST_SERVER_ITEM_ACCESS_TOKEN: ${{ secrets.ROLLBAR_POST_SERVER_ITEM_ACCESS_TOKEN }} | ||
MAILERSEND_API_KEY: ${{ secrets.MAILERSEND_API_KEY }} | ||
NOTIFICATIONS_SENDER_NAME: ${{ vars.NOTIFICATIONS_SENDER_NAME }} | ||
NOTIFICATIONS_SENDER: ${{ vars.NOTIFICATIONS_SENDER }} | ||
SITE_URL: ${{ vars.SITE_URL }} | ||
run: npm run process-notifications:ci |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -58,21 +58,20 @@ jobs: | |
- name: Jest run | ||
run: npm run test:api:ci | ||
env: | ||
REALM_APP_ID: "" | ||
REALM_API_APP_ID: "" | ||
REALM_API_GROUP_ID: "" | ||
REALM_API_PUBLIC_KEY: "" | ||
REALM_API_PRIVATE_KEY: "" | ||
REALM_GRAPHQL_API_KEY: "" | ||
REALM_APP_ID: dummy | ||
REALM_API_APP_ID: dummy | ||
REALM_API_GROUP_ID: dummy | ||
REALM_API_PUBLIC_KEY: dummy | ||
REALM_API_PRIVATE_KEY: dummy | ||
REALM_GRAPHQL_API_KEY: dummy | ||
API_MONGODB_CONNECTION_STRING: "" # dinamically set by globalSetup.ts | ||
E2E_ADMIN_USERNAME: "" | ||
E2E_ADMIN_PASSWORD: "" | ||
ROLLBAR_POST_SERVER_ITEM_ACCESS_TOKEN: sarasa | ||
MAILERSEND_API_KEY: something | ||
NOTIFICATIONS_SENDER_NAME: Test Preview | ||
NOTIFICATIONS_SENDER: [email protected] | ||
PROCESS_NOTIFICATIONS_SECRET: sarasa | ||
SITE_URL: http://localhost:8000 | ||
NEXTAUTH_URL: http://localhost:8000 | ||
NEXTAUTH_SECRET: dummy | ||
|
||
- name: Upload coverage reports to Codecov | ||
uses: codecov/codecov-action@v4 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -48,7 +48,6 @@ jobs: | |
with: | ||
path: | | ||
site/gatsby-site/node_modules | ||
~/.cache/Cypress | ||
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}-${{ inputs.cache-modifier }} | ||
|
||
- name: Install NPM dependencies | ||
|
@@ -57,7 +56,7 @@ jobs: | |
working-directory: site/gatsby-site | ||
|
||
- name: start in memory mongodb | ||
run: nohup node -r ts-node/register playwright/memory-mongo.ts & | ||
run: nohup npm run start:memory-mongo:ci & | ||
working-directory: site/gatsby-site | ||
env: | ||
MONGODB_CONNECTION_STRING: mongodb://127.0.0.1:4110/ | ||
|
@@ -85,11 +84,9 @@ jobs: | |
GATSBY_ALGOLIA_SEARCH_KEY: ${{ vars.GATSBY_ALGOLIA_SEARCH_KEY }} | ||
GATSBY_AVAILABLE_LANGUAGES: ${{ vars.GATSBY_AVAILABLE_LANGUAGES }} | ||
GATSBY_REALM_APP_ID: ${{ vars.GATSBY_REALM_APP_ID }} | ||
GOOGLE_TRANSLATE_API_KEY: ${{ secrets.GOOGLE_TRANSLATE_API_KEY }} | ||
MONGODB_CONNECTION_STRING: mongodb://127.0.0.1:4110/ | ||
MONGODB_TRANSLATIONS_CONNECTION_STRING: mongodb://127.0.0.1:4110/ | ||
MONGODB_MIGRATIONS_CONNECTION_STRING: mongodb://127.0.0.1:4110/ | ||
TRANSLATE_SUBMISSION_DATE_START: ${{ vars.TRANSLATE_SUBMISSION_DATE_START }} | ||
GATSBY_REALM_APP_GRAPHQL_URL: ${{ secrets.GATSBY_REALM_APP_GRAPHQL_URL }} | ||
GATSBY_PRISMIC_REPO_NAME: ${{ vars.GATSBY_PRISMIC_REPO_NAME }} | ||
PRISMIC_ACCESS_TOKEN: ${{ secrets.PRISMIC_ACCESS_TOKEN }} | ||
|
@@ -137,8 +134,9 @@ jobs: | |
MAILERSEND_API_KEY: something | ||
NOTIFICATIONS_SENDER_NAME: Test Preview | ||
NOTIFICATIONS_SENDER: [email protected] | ||
PROCESS_NOTIFICATIONS_SECRET: sarasa | ||
SITE_URL: http://localhost:8000 | ||
NEXTAUTH_URL: http://localhost:8000 | ||
NEXTAUTH_SECRET: 678x1irXYWeiOqTwCv1awvkAUbO9eHa5xzQEYhxhMms= # only used in local tests | ||
|
||
- name: Upload Playwright traces | ||
if: failure() | ||
|
Oops, something went wrong.