Skip to content

ci: update pipelines #5368

ci: update pipelines

ci: update pipelines #5368

name: Deploy to environment
on:
pull_request:
types:
- opened
- ready_for_review
- reopened
- synchronize
concurrency: development_environment
jobs:
setup:
name: Setup
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4.2.2
- name: Set Node version
uses: actions/setup-node@v4.1.0
with:
node-version-file: .nvmrc
cache: yarn
- name: Generate packages cache key
run: ./scripts/checksum.sh ./packages.txt packages
- name: Restore Node modules
id: node-modules
uses: actions/cache@v4.1.2
with:
path: |
./node_modules
./applications/*/*/node_modules
./packages/*/node_modules
key: ${{ runner.os }}-modules-v4-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-modules-
- name: Restore packages
id: packages
uses: actions/cache@v4.1.2
with:
path: ./packages/*/lib
key: ${{ runner.os }}-packages-v4-${{ hashFiles('**/packages.txt') }}
restore-keys: |
${{ runner.os }}-packages-
- name: Restore cache
id: cache
uses: actions/cache@v4.1.2
with:
path: ~/.cache/Cypress
key: ${{ runner.os }}-cache-v4-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-cache-
- name: Install dependencies
if: steps.node-modules.outputs.cache-hit != 'true' || steps.cache.outputs.cache-hit != 'true'
run: yarn
- name: Build packages
if: steps.packages.outputs.cache-hit != 'true' || steps.node-modules.outputs.cache-hit != 'true'
run: yarn package
# Auth0 tenant
auth0-tenant:
name: Deploy Auth0 tenant
runs-on: ubuntu-latest
needs: setup
env:
AUTH0_ALLOW_DELETE: true
AUTH0_CLIENT_ID: ${{ secrets.AUTH0_CLIENT_ID_DEV }}
AUTH0_CLIENT_SECRET: ${{ secrets.AUTH0_CLIENT_SECRET_DEV }}
AUTH0_DOMAIN: ${{ secrets.AUTH0_DOMAIN_DEV }}
AUTH0_SES_ACCESS_KEY_ID: ${{ secrets.AUTH0_SES_ACCESS_KEY_ID }}
AUTH0_SES_ACCESS_SECRET_KEY: ${{ secrets.AUTH0_SES_ACCESS_SECRET_KEY }}
AUTH0_SES_REGION: ${{ secrets.AUTH0_SES_REGION }}
PREFIX: id-develop
PROD_DOMAIN: ${{ secrets.PROD_DOMAIN }}
PUBLIC_URL: https://id-develop.${{ secrets.PROD_DOMAIN }}
REACT_APP_GA: ${{ secrets.GA_ID_DEV }}
STAGE: develop
YARN_ENABLE_IMMUTABLE_INSTALLS: false
permissions:
id-token: write
contents: read
steps:
- name: Checkout code
uses: actions/checkout@v4.2.2
- name: Set Node version
uses: actions/setup-node@v4.1.0
with:
node-version-file: .nvmrc
cache: yarn
- name: Generate packages cache key
run: ./scripts/checksum.sh ./packages.txt packages
- name: Restore Node modules
uses: actions/cache@v4.1.2
with:
path: |
./node_modules
./applications/*/*/node_modules
./packages/*/node_modules
key: ${{ runner.os }}-modules-v4-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-modules-
- name: Restore packages
uses: actions/cache@v4.1.2
with:
path: ./packages/*/lib
key: ${{ runner.os }}-packages-v4-${{ hashFiles('**/packages.txt') }}
restore-keys: |
${{ runner.os }}-packages-
- name: Restore application cache
uses: actions/cache@v4.1.2
with:
path: |
./applications/id/client/node_modules/.cache
./applications/id/client/.serverless
./applications/id/infrastructure/.serverless
key: ${{ runner.os }}-id-v4-${{ github.sha }}
restore-keys: |
${{ runner.os }}-id-v4-
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-region: eu-west-1
role-to-assume: arn:aws:iam::633331859210:role/github-actions
- name: Deploy ID infrastructure
run: yarn workspace @id/infrastructure deploy --stage $STAGE
- name: Build ID client
run: yarn workspace @id/client build
- name: Build ID emails
run: yarn workspace @id/emails build
- name: Deploy client
run: yarn workspace @id/client deploy --stage $STAGE
- name: Deploy to Auth0
run: yarn workspace @id/tenant deploy -c config.json
# Anti virus
anti-virus:
name: Deploy anti virus
runs-on: ubuntu-latest
needs: setup
env:
AWS_DEFAULT_REGION: eu-west-1
SENTRY_DSN: ${{ secrets.SENTRY_DSN_CORE_BACKEND }}
STAGE: ${{ github.event.pull_request.number }}
YARN_ENABLE_IMMUTABLE_INSTALLS: false
permissions:
id-token: write
contents: read
steps:
- name: Checkout code
uses: actions/checkout@v4.2.2
- name: Set Node version
uses: actions/setup-node@v4.1.0
with:
node-version-file: .nvmrc
cache: yarn
- name: Generate packages cache key
run: ./scripts/checksum.sh ./packages.txt packages
- name: Restore Node modules
uses: actions/cache@v4.1.2
with:
path: |
./node_modules
./applications/*/*/node_modules
./packages/*/node_modules
key: ${{ runner.os }}-modules-v4-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-modules-
- name: Restore packages
uses: actions/cache@v4.1.2
with:
path: ./packages/*/lib
key: ${{ runner.os }}-packages-v4-${{ hashFiles('**/packages.txt') }}
restore-keys: |
${{ runner.os }}-packages-
- name: Restore application cache
uses: actions/cache@v4.1.2
with:
path: |
./applications/core/anti-virus/node_modules/.cache
./applications/core/anti-virus/.serverless
key: ${{ runner.os }}-core-anti-virus-v4-${{ github.sha }}
restore-keys: |
${{ runner.os }}-core-anti-virus-v4-
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-region: eu-west-1
role-to-assume: arn:aws:iam::633331859210:role/github-actions
- name: Deploy
uses: nick-fields/retry@v3.0.0
with:
command: yarn workspace @core/anti-virus deploy --stage $STAGE
max_attempts: 3
on_retry_command: yarn workspace @core/anti-virus clean
retry_on: error
timeout_minutes: 15
- name: Check for definitions
id: definitions
continue-on-error: true
run: aws s3api head-object --bucket anti-virus-${{ github.event.pull_request.number }}-definitions --key daily.cvd
- name: Update definitions
if: steps.definitions.outcome != 'success'
run: yarn workspace @core/anti-virus update-definitions --stage $STAGE
# Cypress (API)
cypress-api:
name: Deploy Cypress API
runs-on: ubuntu-latest
needs: setup
env:
CY_API_KEY: ${{ secrets.CY_API_KEY }}
CY_API_GITHUB_PRIVATE_KEY: ${{ secrets.CY_API_GITHUB_PRIVATE_KEY }}
CY_API_GITHUB_APP_ID: ${{ secrets.CY_API_GITHUB_APP_ID }}
CY_API_GITHUB_CLIENT_ID: ${{ secrets.CY_API_GITHUB_CLIENT_ID }}
CY_API_GITHUB_INSTALLATION_ID: ${{ secrets.CY_API_GITHUB_INSTALLATION_ID }}
STAGE: develop
YARN_ENABLE_IMMUTABLE_INSTALLS: false
permissions:
id-token: write
contents: read
steps:
- name: Checkout code
uses: actions/checkout@v4.2.2
- name: Set Node version
uses: actions/setup-node@v4.1.0
with:
node-version-file: .nvmrc
cache: yarn
- name: Restore Node modules
uses: actions/cache@v4.1.2
with:
path: |
./node_modules
./applications/*/*/node_modules
./packages/*/node_modules
key: ${{ runner.os }}-modules-v4-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-modules-
- name: Restore packages
uses: actions/cache@v4.1.2
with:
path: ./packages/*/lib
key: ${{ runner.os }}-packages-v4-${{ hashFiles('**/packages.txt') }}
restore-keys: |
${{ runner.os }}-packages-
- name: Restore application cache
uses: actions/cache@v4.1.2
with:
path: |
./applications/cypress/api/node_modules/.cache
./applications/cypress/api/.serverless
key: ${{ runner.os }}-cypress-api-v4-${{ github.sha }}
restore-keys: |
${{ runner.os }}-cypress-api-v4-
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-region: eu-west-1
role-to-assume: arn:aws:iam::633331859210:role/github-actions
- name: Deploy
run: yarn workspace @cypress/api deploy --stage $STAGE
# Accounts (queue)
accounts-queue:
name: Deploy accounts queue
runs-on: ubuntu-latest
needs:
- setup
- accounts-data
env:
SENTRY_DSN: ${{ secrets.SENTRY_DSN_ACCOUNTS_BACKEND }}
STAGE: ${{ github.event.pull_request.number }}
YARN_ENABLE_IMMUTABLE_INSTALLS: false
permissions:
id-token: write
contents: read
steps:
- name: Checkout code
uses: actions/checkout@v4.2.2
- name: Set Node version
uses: actions/setup-node@v4.1.0
with:
node-version-file: .nvmrc
cache: yarn
- name: Generate packages cache key
run: ./scripts/checksum.sh ./packages.txt packages
- name: Restore Node modules
uses: actions/cache@v4.1.2
with:
path: |
./node_modules
./applications/*/*/node_modules
./packages/*/node_modules
key: ${{ runner.os }}-modules-v4-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-modules-
- name: Restore packages
uses: actions/cache@v4.1.2
with:
path: ./packages/*/lib
key: ${{ runner.os }}-packages-v4-${{ hashFiles('**/packages.txt') }}
restore-keys: |
${{ runner.os }}-packages-
- name: Restore application cache
uses: actions/cache@v4.1.2
with:
path: |
./applications/accounts/queue/node_modules/.cache
./applications/accounts/queue/.serverless
key: ${{ runner.os }}-accounts-queue-v4-${{ github.sha }}
restore-keys: |
${{ runner.os }}-accounts-queue-v4-
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-region: eu-west-1
role-to-assume: arn:aws:iam::633331859210:role/github-actions
- name: Deploy
run: yarn workspace @accounts/queue deploy --stage $STAGE
# Accounts (storage)
accounts-storage:
name: Deploy accounts storage
runs-on: ubuntu-latest
needs:
- setup
- anti-virus
env:
SENTRY_DSN: ${{ secrets.SENTRY_DSN_ACCOUNTS_BACKEND }}
STAGE: ${{ github.event.pull_request.number }}
YARN_ENABLE_IMMUTABLE_INSTALLS: false
permissions:
id-token: write
contents: read
steps:
- name: Checkout code
uses: actions/checkout@v4.2.2
- name: Set Node version
uses: actions/setup-node@v4.1.0
with:
node-version-file: .nvmrc
cache: yarn
- name: Generate packages cache key
run: ./scripts/checksum.sh ./packages.txt packages
- name: Restore Node modules
uses: actions/cache@v4.1.2
with:
path: |
./node_modules
./applications/*/*/node_modules
./packages/*/node_modules
key: ${{ runner.os }}-modules-v4-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-modules-
- name: Restore packages
uses: actions/cache@v4.1.2
with:
path: ./packages/*/lib
key: ${{ runner.os }}-packages-v4-${{ hashFiles('**/packages.txt') }}
restore-keys: |
${{ runner.os }}-packages-
- name: Restore application cache
uses: actions/cache@v4.1.2
with:
path: |
./applications/accounts/storage/node_modules/.cache
./applications/accounts/storage/.serverless
key: ${{ runner.os }}-accounts-storage-v4-${{ github.sha }}
restore-keys: |
${{ runner.os }}-accounts-storage-v4-
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-region: eu-west-1
role-to-assume: arn:aws:iam::633331859210:role/github-actions
- name: Deploy
run: yarn workspace @accounts/storage deploy --stage $STAGE
# Accounts (data)
accounts-data:
name: Deploy accounts data
runs-on: ubuntu-latest
needs:
- setup
- accounts-storage
env:
SENTRY_DSN: ${{ secrets.SENTRY_DSN_ACCOUNTS_BACKEND }}
STAGE: ${{ github.event.pull_request.number }}
YARN_ENABLE_IMMUTABLE_INSTALLS: false
permissions:
id-token: write
contents: read
steps:
- name: Checkout code
uses: actions/checkout@v4.2.2
- name: Set Node version
uses: actions/setup-node@v4.1.0
with:
node-version-file: .nvmrc
cache: yarn
- name: Generate packages cache key
run: ./scripts/checksum.sh ./packages.txt packages
- name: Restore Node modules
uses: actions/cache@v4.1.2
with:
path: |
./node_modules
./applications/*/*/node_modules
./packages/*/node_modules
key: ${{ runner.os }}-modules-v4-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-modules-
- name: Restore packages
uses: actions/cache@v4.1.2
with:
path: ./packages/*/lib
key: ${{ runner.os }}-packages-v4-${{ hashFiles('**/packages.txt') }}
restore-keys: |
${{ runner.os }}-packages-
- name: Restore application cache
uses: actions/cache@v4.1.2
with:
path: |
./applications/accounts/data/node_modules/.cache
./applications/accounts/data/.serverless
key: ${{ runner.os }}-accounts-data-v4-${{ github.sha }}
restore-keys: |
${{ runner.os }}-accounts-data-v4-
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-region: eu-west-1
role-to-assume: arn:aws:iam::633331859210:role/github-actions
- name: Deploy
run: yarn workspace @accounts/data deploy --stage $STAGE
# Accounts (warm up)
accounts-warm-up:
name: Deploy accounts warm up
runs-on: ubuntu-latest
needs:
- setup
- accounts-data
env:
SENTRY_DSN: ${{ secrets.SENTRY_DSN_ACCOUNTS_BACKEND }}
STAGE: ${{ github.event.pull_request.number }}
YARN_ENABLE_IMMUTABLE_INSTALLS: false
permissions:
id-token: write
contents: read
steps:
- name: Checkout code
uses: actions/checkout@v4.2.2
- name: Set Node version
uses: actions/setup-node@v4.1.0
with:
node-version-file: .nvmrc
cache: yarn
- name: Generate packages cache key
run: ./scripts/checksum.sh ./packages.txt packages
- name: Restore Node modules
uses: actions/cache@v4.1.2
with:
path: |
./node_modules
./applications/*/*/node_modules
./packages/*/node_modules
key: ${{ runner.os }}-modules-v4-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-modules-
- name: Restore packages
uses: actions/cache@v4.1.2
with:
path: ./packages/*/lib
key: ${{ runner.os }}-packages-v4-${{ hashFiles('**/packages.txt') }}
restore-keys: |
${{ runner.os }}-packages-
- name: Restore application cache
uses: actions/cache@v4.1.2
with:
path: |
./applications/accounts/warm-up/node_modules/.cache
./applications/accounts/warm-up/.serverless
key: ${{ runner.os }}-accounts-warm-up-v4-${{ github.sha }}
restore-keys: |
${{ runner.os }}-accounts-warm-up-v4-
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-region: eu-west-1
role-to-assume: arn:aws:iam::633331859210:role/github-actions
- name: Deploy
run: yarn workspace @accounts/warm-up deploy --stage $STAGE
- name: Warm up
if: github.event.action != 'synchronize'
run: yarn workspace @accounts/warm-up start --stage $STAGE
# Accounts (notifications)
accounts-notifications:
name: Deploy accounts notifications
runs-on: ubuntu-latest
needs:
- setup
- accounts-data
env:
STAGE: ${{ github.event.pull_request.number }}
YARN_ENABLE_IMMUTABLE_INSTALLS: false
permissions:
id-token: write
contents: read
steps:
- name: Checkout code
uses: actions/checkout@v4.2.2
- name: Set Node version
uses: actions/setup-node@v4.1.0
with:
node-version-file: .nvmrc
cache: yarn
- name: Generate packages cache key
run: ./scripts/checksum.sh ./packages.txt packages
- name: Restore Node modules
uses: actions/cache@v4.1.2
with:
path: |
./node_modules
./applications/*/*/node_modules
./packages/*/node_modules
key: ${{ runner.os }}-modules-v4-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-modules-
- name: Restore packages
uses: actions/cache@v4.1.2
with:
path: ./packages/*/lib
key: ${{ runner.os }}-packages-v4-${{ hashFiles('**/packages.txt') }}
restore-keys: |
${{ runner.os }}-packages-
- name: Restore application cache
uses: actions/cache@v4.1.2
with:
path: |
./applications/accounts/notifications/node_modules/.cache
./applications/accounts/notifications/.serverless
key: ${{ runner.os }}-accounts-notifications-v4-${{ github.sha }}
restore-keys: |
${{ runner.os }}-accounts-notifications-v4-
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-region: eu-west-1
role-to-assume: arn:aws:iam::633331859210:role/github-actions
- name: Deploy
run: yarn workspace @accounts/notifications deploy --stage $STAGE
# Accounts (reports)
accounts-reports:
name: Deploy accounts reports
runs-on: ubuntu-latest
needs:
- setup
- accounts-data
- accounts-notifications
- accounts-storage
env:
SENTRY_DSN: ${{ secrets.SENTRY_DSN_ACCOUNTS_BACKEND }}
STAGE: ${{ github.event.pull_request.number }}
YARN_ENABLE_IMMUTABLE_INSTALLS: false
permissions:
id-token: write
contents: read
steps:
- name: Checkout code
uses: actions/checkout@v4.2.2
- name: Set Node version
uses: actions/setup-node@v4.1.0
with:
node-version-file: .nvmrc
cache: yarn
- name: Generate packages cache key
run: ./scripts/checksum.sh ./packages.txt packages
- name: Restore Node modules
uses: actions/cache@v4.1.2
with:
path: |
./node_modules
./applications/*/*/node_modules
./packages/*/node_modules
key: ${{ runner.os }}-modules-v4-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-modules-
- name: Restore packages
uses: actions/cache@v4.1.2
with:
path: ./packages/*/lib
key: ${{ runner.os }}-packages-v4-${{ hashFiles('**/packages.txt') }}
restore-keys: |
${{ runner.os }}-packages-
- name: Restore application cache
uses: actions/cache@v4.1.2
with:
path: |
./applications/accounts/reports/node_modules/.cache
./applications/accounts/reports/.serverless
key: ${{ runner.os }}-accounts-reports-v4-${{ github.sha }}
restore-keys: |
${{ runner.os }}-accounts-reports-v4-
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-region: eu-west-1
role-to-assume: arn:aws:iam::633331859210:role/github-actions
- name: Deploy
run: yarn workspace @accounts/reports deploy --stage $STAGE
# Accounts (API)
accounts-api:
name: Deploy accounts API
runs-on: ubuntu-latest
needs:
- setup
- accounts-data
- accounts-queue
- accounts-reports
- accounts-storage
- auth0-tenant
env:
AUTH0_DOMAIN: ${{ secrets.AUTH0_DOMAIN_DEV }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SENTRY_DSN: ${{ secrets.SENTRY_DSN_ACCOUNTS_BACKEND }}
STAGE: ${{ github.event.pull_request.number }}
YARN_ENABLE_IMMUTABLE_INSTALLS: false
permissions:
id-token: write
contents: read
steps:
- name: Checkout code
uses: actions/checkout@v4.2.2
- name: Set Node version
uses: actions/setup-node@v4.1.0
with:
node-version-file: .nvmrc
cache: yarn
- name: Generate packages cache key
run: ./scripts/checksum.sh ./packages.txt packages
- name: Restore Node modules
uses: actions/cache@v4.1.2
with:
path: |
./node_modules
./applications/*/*/node_modules
./packages/*/node_modules
key: ${{ runner.os }}-modules-v4-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-modules-
- name: Restore packages
uses: actions/cache@v4.1.2
with:
path: ./packages/*/lib
key: ${{ runner.os }}-packages-v4-${{ hashFiles('**/packages.txt') }}
restore-keys: |
${{ runner.os }}-packages-
- name: Restore env vars
uses: actions/cache@v4.1.2
with:
path: ./applications/accounts/client/.env.production
key: ${{ runner.os }}-accounts-client-env-vars-checks-v4-${{ github.run_id }}
restore-keys: |
${{ runner.os }}-accounts-client-env-vars-checks-
- name: Restore application cache
uses: actions/cache@v4.1.2
with:
path: |
./applications/accounts/api/node_modules/.cache
./applications/accounts/api/.serverless
key: ${{ runner.os }}-accounts-api-v4-${{ github.sha }}
restore-keys: |
${{ runner.os }}-accounts-api-v4-
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-region: eu-west-1
role-to-assume: arn:aws:iam::633331859210:role/github-actions
- name: Deploy
run: yarn workspace @accounts/api deploy --stage $STAGE
- name: Export env vars
uses: xom9ikk/dotenv@v2.3.0
with:
path: ./applications/accounts/client
mode: production
- name: Publish URL
uses: mshick/add-pr-comment@v2.8.2
with:
message-id: config
message: |
Add these params to your `.env.local` file
```
REACT_APP_APPSYNC_URL="${{ env.REACT_APP_APPSYNC_URL }}"
REACT_APP_AWS_REGION="${{ env.REACT_APP_AWS_REGION }}"
```
# Accounts (client)
accounts-client:
name: Test accounts client
runs-on: ubuntu-latest
needs:
- setup
- auth0-tenant
- accounts-api
- accounts-warm-up
- cypress-api
strategy:
fail-fast: false
matrix:
containers:
- 1
- 2
env:
CURRENTS_API_URL: ${{ secrets.CYPRESS_API_URL }}
CURRENTS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
CYPRESS_AUDIENCE: ${{ secrets.ACCOUNTS_APP_AUDIENCE }}
CYPRESS_AUTH_URL: ${{ secrets.CYPRESS_AUTH_URL_DEV }}
CYPRESS_CLIENT_ID: ${{ secrets.ACCOUNTS_APP_CLIENT_ID_DEV }}
CYPRESS_PASSWORD: ${{ secrets.CYPRESS_PASSWORD }}
CYPRESS_USERNAME: ${{ secrets.CYPRESS_USERNAME }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
REACT_APP_AUTH0_AUDIENCE: ${{ secrets.ACCOUNTS_APP_AUDIENCE }}
REACT_APP_AUTH0_CLIENT_ID: ${{ secrets.ACCOUNTS_APP_CLIENT_ID_DEV }}
REACT_APP_AUTH0_DOMAIN: ${{ secrets.AUTH0_DOMAIN_DEV }}
REACT_APP_GA: ${{ secrets.GA_ACCOUNTS_DEV }}
REACT_APP_SENTRY_DSN: ${{ secrets.SENTRY_DSN_ACCOUNTS_CLIENT }}
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
steps:
- name: Checkout code
uses: actions/checkout@v4.2.2
- name: Set Node version
uses: actions/setup-node@v4.1.0
with:
node-version-file: .nvmrc
cache: yarn
- name: Generate packages cache key
run: ./scripts/checksum.sh ./packages.txt packages
- name: Restore Node modules
uses: actions/cache@v4.1.2
with:
path: |
./node_modules
./applications/*/*/node_modules
./packages/*/node_modules
key: ${{ runner.os }}-modules-v4-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-modules-
- name: Restore packages
uses: actions/cache@v4.1.2
with:
path: ./packages/*/lib
key: ${{ runner.os }}-packages-v4-${{ hashFiles('**/packages.txt') }}
restore-keys: |
${{ runner.os }}-packages-
- name: Restore cache
uses: actions/cache@v4.1.2
with:
path: ~/.cache/Cypress
key: ${{ runner.os }}-cache-v4-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-cache-
- name: Restore env vars
uses: actions/cache@v4.1.2
with:
path: ./applications/accounts/client/.env.production
key: ${{ runner.os }}-accounts-client-env-vars-checks-v4-${{ github.run_id }}
restore-keys: |
${{ runner.os }}-accounts-client-env-vars-checks-
- name: Restore application cache
uses: actions/cache@v4.1.2
with:
path: |
./applications/accounts/client/node_modules/.cache
./applications/accounts/client/.serverless
key: ${{ runner.os }}-accounts-client-v4-${{ github.sha }}
restore-keys: |
${{ runner.os }}-accounts-client-v4-
- name: Build client
run: yarn workspace @accounts/client build
- name: Smoke tests
uses: cypress-io/github-action@v6.7.7
with:
command: yarn workspace @accounts/client e2e-ci
install: false
start: yarn workspace @accounts/client serve
wait-on: http://localhost:3000