Skip to content

chore(deps): update yarn to v4.5.2 #1249

chore(deps): update yarn to v4.5.2

chore(deps): update yarn to v4.5.2 #1249

name: Teardown environment
on:
pull_request:
types:
- closed
workflow_dispatch:
inputs:
stage:
description: 'Stage'
required: true
jobs:
setup:
name: Setup
if: github.actor != 'dependabot[bot]'
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: 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
# Anti virus
anti-virus:
name: Teardown anti virus
if: github.actor != 'dependabot[bot]' && always()
runs-on: ubuntu-latest
needs:
- setup
- accounts-storage
env:
AWS_DEFAULT_REGION: eu-west-1
DEFINITIONS_BUCKET: s3://anti-virus-${{ github.event.pull_request.number || github.event.inputs.stage }}-definitions
SENTRY_DSN: ${{ secrets.SENTRY_DSN_CORE_BACKEND }}
STAGE: ${{ github.event.pull_request.number || github.event.inputs.stage }}
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: 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: Clear bucket
continue-on-error: true
run: aws s3 rm $DEFINITIONS_BUCKET --recursive
- name: Teardown
run: yarn workspace @core/anti-virus teardown --stage $STAGE
# Accounts (queue)
accounts-queue:
name: Teardown accounts queue
if: github.actor != 'dependabot[bot]' && always()
runs-on: ubuntu-latest
needs:
- setup
- accounts-api
env:
SENTRY_DSN: ${{ secrets.SENTRY_DSN_ACCOUNTS_BACKEND }}
STAGE: ${{ github.event.pull_request.number || github.event.inputs.stage }}
permissions:
id-token: write
contents: read
steps:
- name: Checkout code
uses: actions/checkout@v4.2.2
- name: Generate packages cache key
run: ./scripts/checksum.sh ./packages.txt packages
- 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: 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: Teardown
run: yarn workspace @accounts/queue teardown --stage $STAGE
# Accounts (storage)
accounts-storage:
name: Teardown accounts storage
if: github.actor != 'dependabot[bot]' && always()
runs-on: ubuntu-latest
needs:
- setup
- accounts-api
- accounts-data
- accounts-reports
env:
AWS_DEFAULT_REGION: eu-west-1
DOWNLOAD_BUCKET: s3://accounts-${{ github.event.pull_request.number || github.event.inputs.stage }}-downloads
SENTRY_DSN: ${{ secrets.SENTRY_DSN_ACCOUNTS_BACKEND }}
STAGE: ${{ github.event.pull_request.number || github.event.inputs.stage }}
UPLOAD_BUCKET: s3://accounts-${{ github.event.pull_request.number || github.event.inputs.stage }}-uploads
permissions:
id-token: write
contents: read
steps:
- name: Checkout code
uses: actions/checkout@v4.2.2
- name: Generate packages cache key
run: ./scripts/checksum.sh ./packages.txt packages
- 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: 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: Clear bucket
continue-on-error: true
run: |
aws s3 rm $DOWNLOAD_BUCKET --recursive
aws s3 rm $UPLOAD_BUCKET --recursive
- name: Teardown
run: yarn workspace @accounts/storage teardown --stage $STAGE
# Accounts (data)
accounts-data:
name: Teardown accounts data
if: github.actor != 'dependabot[bot]' && always()
runs-on: ubuntu-latest
needs:
- setup
- accounts-api
- accounts-notifications
- accounts-reports
- accounts-warm-up
env:
SENTRY_DSN: ${{ secrets.SENTRY_DSN_ACCOUNTS_BACKEND }}
STAGE: ${{ github.event.pull_request.number || github.event.inputs.stage }}
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: 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: Teardown
run: yarn workspace @accounts/data teardown --stage $STAGE
# Accounts (warm up)
accounts-warm-up:
name: Teardown accounts warm up
if: github.actor != 'dependabot[bot]' && always()
runs-on: ubuntu-latest
needs:
- setup
env:
SENTRY_DSN: ${{ secrets.SENTRY_DSN_ACCOUNTS_BACKEND }}
STAGE: ${{ github.event.pull_request.number || github.event.inputs.stage }}
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: 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: Teardown
run: yarn workspace @accounts/warm-up teardown --stage $STAGE
# Accounts (notifications)
accounts-notifications:
name: Teardown accounts notifications
if: github.actor != 'dependabot[bot]' && always()
runs-on: ubuntu-latest
needs:
- setup
- accounts-reports
env:
STAGE: ${{ github.event.pull_request.number || github.event.inputs.stage }}
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: 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: Teardown
run: yarn workspace @accounts/notifications teardown --stage $STAGE
# Accounts (reports)
accounts-reports:
name: Teardown accounts reports
if: github.actor != 'dependabot[bot]' && always()
runs-on: ubuntu-latest
needs:
- setup
- accounts-api
env:
AWS_DEFAULT_REGION: eu-west-1
REPORTS_BUCKET: s3://accounts-${{ github.event.pull_request.number || github.event.inputs.stage }}-reports
SENTRY_DSN: ${{ secrets.SENTRY_DSN_ACCOUNTS_BACKEND }}
STAGE: ${{ github.event.pull_request.number || github.event.inputs.stage }}
permissions:
id-token: write
contents: read
steps:
- name: Checkout code
uses: actions/checkout@v4
- 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: 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: Clear bucket
continue-on-error: true
run: aws s3 rm $REPORTS_BUCKET --recursive
- name: Teardown
run: yarn workspace @accounts/reports teardown --stage $STAGE
# Accounts (API)
accounts-api:
name: Teardown accounts API
if: github.actor != 'dependabot[bot]' && always()
runs-on: ubuntu-latest
needs: setup
env:
AUTH0_DOMAIN: ${{ secrets.AUTH0_DOMAIN_DEV }}
SENTRY_DSN: ${{ secrets.SENTRY_DSN_ACCOUNTS_BACKEND }}
STAGE: ${{ github.event.pull_request.number || github.event.inputs.stage }}
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: 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: Teardown
run: yarn workspace @accounts/api teardown --stage $STAGE