Skip to content

Commit

Permalink
Release by 29.02.2024 (#1079)
Browse files Browse the repository at this point in the history
  • Loading branch information
Yakutoc authored Mar 1, 2024
2 parents 3c84b84 + 22be510 commit ac46c1c
Show file tree
Hide file tree
Showing 1,787 changed files with 111,621 additions and 173,986 deletions.
16 changes: 7 additions & 9 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ packages/plasma-tokens-b2b/*
!packages/plasma-tokens-b2b/data
!packages/plasma-tokens-b2b/generate.ts

packages/tokens/tokens-plasma/*
packages/tokens/tokens-sdds/*
packages/tokens/tokens-flamingo/*
packages/tokens/tokens-caldera-online/*

packages/plasma-tokens-b2c/*
!packages/plasma-tokens-b2c/dataColors.ts
!packages/plasma-tokens-b2c/generate.ts
Expand All @@ -43,8 +48,8 @@ examples/**
packages/plasma-asdk/*
!packages/plasma-asdk/src

packages/sdds-srvc/*
!packages/sdds-srvc/src
packages/sdds-serv/*
!packages/sdds-serv/src

packages/caldera/*
!packages/caldera/src
Expand All @@ -67,13 +72,6 @@ packages/plasma-web/*
packages/plasma-icons/*
!packages/plasma-icons/src

packages/plasma-temple/*
!packages/plasma-temple/src

packages/plasma-basic-template/*

packages/plasma-shop-template/*

utils/plasma-cy-utils/*
!utils/plasma-cy-utils/src

Expand Down
20 changes: 20 additions & 0 deletions .github/actions/prepare-android-env/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: 'Prepare Android environment'

description: 'Setup gradle with cache'

runs:
using: "composite"
steps:
- name: Cache Gradle
uses: actions/cache@v4
with:
path: |
~/.m2/repository
./.gradle
~/.gradle/cache
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle.kts') }}
restore-keys: ${{ runner.os }}-gradle-

- name: Make Gradle executable
shell: bash
run: chmod +x ./native/sdds-android/gradlew
18 changes: 4 additions & 14 deletions .github/processing-scope.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
const CYPRESS_SCOPE = [
'@salutejs/plasma-web',
'@salutejs/plasma-b2c',
'@salutejs/plasma-ui',
'@salutejs/plasma-temple',
];
const CYPRESS_SCOPE = ['@salutejs/plasma-web', '@salutejs/plasma-b2c', '@salutejs/plasma-ui'];

module.exports = () => {
const { CHANGED_STATE, AS_ENUMERATION } = process.env;
Expand Down Expand Up @@ -38,28 +33,25 @@ module.exports = () => {

const HAS_PLASMA_UI_DOCS = packagesList.includes('@salutejs/plasma-ui-docs');
const HAS_PLASMA_WEB_DOCS = packagesList.includes('@salutejs/plasma-web-docs');
const HAS_PLASMA_TEMPLE_DOCS = packagesList.includes('@salutejs/plasma-temple-docs');

const HAS_PLASMA_UI = packagesList.includes('@salutejs/plasma-ui');
const HAS_PLASMA_WEB = packagesList.includes('@salutejs/plasma-web');
const HAS_PLASMA_B2C = packagesList.includes('@salutejs/plasma-b2c');
const HAS_PLASMA_TEMPLE = packagesList.includes('@salutejs/plasma-temple');
const HAS_PLASMA_HOPE = packagesList.includes('@salutejs/plasma-new-hope');
const HAS_PLASMA_ASDK = packagesList.includes('@salutejs/plasma-asdk');
const HAS_CALDERA = packagesList.includes('@salutejs/caldera');
const HAS_CALDERA_ONLINE = packagesList.includes('@salutejs/caldera-online');
const HAS_SDDS_SRVC = packagesList.includes('@salutejs/sdds-srvc');
const HAS_SDDS_SERV = packagesList.includes('@salutejs/sdds-serv');
const HAS_PLASMA_WEBSITE = packagesList.includes('@salutejs/plasma-website');

const HAS_DOCUMENTATION_CHANGED =
HAS_PLASMA_WEBSITE ||
HAS_PLASMA_UI_DOCS ||
HAS_PLASMA_WEB_DOCS ||
HAS_PLASMA_TEMPLE_DOCS ||
HAS_PLASMA_ASDK ||
HAS_CALDERA ||
HAS_CALDERA_ONLINE ||
HAS_SDDS_SRVC;
HAS_SDDS_SERV;

// Флаг для управления логикой "@auto-it" плагина upload-assets-extend
// Изменения в plasma-tokens или plasma-tokens-utils так же повлияют на то что в packagesList окажется plasma-tokens-native
Expand Down Expand Up @@ -89,16 +81,14 @@ module.exports = () => {
HAS_DOCUMENTATION_CHANGED,
HAS_PLASMA_UI_DOCS,
HAS_PLASMA_WEB_DOCS,
HAS_PLASMA_TEMPLE_DOCS,
HAS_PLASMA_UI,
HAS_PLASMA_WEB,
HAS_PLASMA_B2C,
HAS_PLASMA_TEMPLE,
HAS_PLASMA_HOPE,
HAS_PLASMA_ASDK,
HAS_ASSETS,
HAS_CALDERA,
HAS_CALDERA_ONLINE,
HAS_SDDS_SRVC,
HAS_SDDS_SERV,
};
};
74 changes: 74 additions & 0 deletions .github/workflows/android-code-quality-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
name: 'Code Quality Check'

on:
pull_request:
paths:
- 'native/sdds-android/**'
push:
paths:
- 'native/sdds-android/**'

concurrency:
# New commit on branch cancels running workflows of the same branch
group: ${{ github.workflow }}-${{ github.head_ref }}
cancel-in-progress: true


defaults:
run:
working-directory: ./native/sdds-android

jobs:
lint:
name: Perform static analysis
runs-on: ubuntu-latest
steps:
- name: Checkout the code
uses: actions/checkout@v4

- name: Prepare environment
uses: ./.github/actions/prepare-android-env

- name: Run lint
run: ./gradlew lintDebugAll

- name: Run detekt
run: ./gradlew detektAll

- name: Run spotless
run: ./gradlew spotlessCheckAll

- name: Merge reports
if: success() || failure()
run: ./gradlew mergeReports

- name: Upload static analysis reports
if: success() || failure()
uses: actions/upload-artifact@v2
with:
name: static_analysis
path: native/sdds-android/build/reports/

unit-test:
name: Perform Unit Testing
runs-on: ubuntu-latest
steps:
- name: Checkout the code
uses: actions/checkout@v4

- name: Prepare environment
uses: ./.github/actions/prepare-android-env

- name: Run tests
run: ./gradlew test

- name: Merge test reports
if: success() || failure()
run: ./gradlew copyTestsReports

- name: Upload test reports
if: success() || failure()
uses: actions/upload-artifact@v4
with:
name: test-reports.zip
path: native/sdds-android/build/reports/test-reports.zip
20 changes: 5 additions & 15 deletions .github/workflows/change-detection.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
default: false
type: boolean
as-enumeration:
description: 'Get scope as "[plasma-temple,plasma-core,plasma-ui]", etc'
description: 'Get scope as "[plasma-core,plasma-ui]", etc'
default: false
type: boolean
ref:
Expand All @@ -31,9 +31,6 @@ on:
HAS_PLASMA_WEB_DOCS:
description: ""
value: ${{ jobs.run.outputs.HAS_PLASMA_WEB_DOCS }}
HAS_PLASMA_TEMPLE_DOCS:
description: ""
value: ${{ jobs.run.outputs.HAS_PLASMA_TEMPLE_DOCS }}
HAS_PLASMA_UI:
description: ""
value: ${{ jobs.run.outputs.HAS_PLASMA_UI }}
Expand All @@ -43,9 +40,6 @@ on:
HAS_PLASMA_B2C:
description: ""
value: ${{ jobs.run.outputs.HAS_PLASMA_B2C }}
HAS_PLASMA_TEMPLE:
description: ""
value: ${{ jobs.run.outputs.HAS_PLASMA_TEMPLE }}
HAS_PLASMA_HOPE:
description: ""
value: ${{ jobs.run.outputs.HAS_PLASMA_HOPE }}
Expand All @@ -58,9 +52,9 @@ on:
HAS_CALDERA_ONLINE:
description: ""
value: ${{ jobs.run.outputs.HAS_CALDERA_ONLINE }}
HAS_SDDS_SRVC:
HAS_SDDS_SERV:
description: ""
value: ${{ jobs.run.outputs.HAS_SDDS_SRVC }}
value: ${{ jobs.run.outputs.HAS_SDDS_SERV }}
HAS_ASSETS:
description: ""
value: ${{ jobs.run.outputs.HAS_ASSETS }}
Expand All @@ -76,16 +70,14 @@ jobs:
HAS_DOCUMENTATION_CHANGED: ${{ steps.set-output.outputs.HAS_DOCUMENTATION_CHANGED }}
HAS_PLASMA_UI_DOCS: ${{ steps.set-output.outputs.HAS_PLASMA_UI_DOCS }}
HAS_PLASMA_WEB_DOCS: ${{ steps.set-output.outputs.HAS_PLASMA_WEB_DOCS }}
HAS_PLASMA_TEMPLE_DOCS: ${{ steps.set-output.outputs.HAS_PLASMA_TEMPLE_DOCS }}
HAS_PLASMA_TEMPLE: ${{ steps.set-output.outputs.HAS_PLASMA_TEMPLE }}
HAS_PLASMA_B2C: ${{ steps.set-output.outputs.HAS_PLASMA_B2C }}
HAS_PLASMA_WEB: ${{ steps.set-output.outputs.HAS_PLASMA_WEB }}
HAS_PLASMA_UI: ${{ steps.set-output.outputs.HAS_PLASMA_UI }}
HAS_PLASMA_HOPE: ${{ steps.set-output.outputs.HAS_PLASMA_HOPE }}
HAS_PLASMA_ASDK: ${{ steps.set-output.outputs.HAS_PLASMA_ASDK }}
HAS_CALDERA: ${{ steps.set-output.outputs.HAS_CALDERA }}
HAS_CALDERA_ONLINE: ${{ steps.set-output.outputs.HAS_CALDERA_ONLINE }}
HAS_SDDS_SRVC: ${{ steps.set-output.outputs.HAS_SDDS_SRVC }}
HAS_SDDS_SERV: ${{ steps.set-output.outputs.HAS_SDDS_SERV }}
HAS_ASSETS: ${{ steps.set-output.outputs.HAS_ASSETS }}
PACKAGES_ENUMERATION: ${{ steps.set-output.outputs.PACKAGES_ENUMERATION }}

Expand Down Expand Up @@ -129,17 +121,15 @@ jobs:
echo "HAS_SCOPE=${{ fromJSON(steps.scope.outputs.result).HAS_SCOPE }}" >> $GITHUB_OUTPUT
echo "HAS_PLASMA_UI_DOCS=${{ fromJSON(steps.scope.outputs.result).HAS_PLASMA_UI_DOCS }}" >> $GITHUB_OUTPUT
echo "HAS_PLASMA_WEB_DOCS=${{ fromJSON(steps.scope.outputs.result).HAS_PLASMA_WEB_DOCS }}" >> $GITHUB_OUTPUT
echo "HAS_PLASMA_TEMPLE_DOCS=${{ fromJSON(steps.scope.outputs.result).HAS_PLASMA_TEMPLE_DOCS }}" >> $GITHUB_OUTPUT
echo "HAS_DOCUMENTATION_CHANGED=${{ fromJSON(steps.scope.outputs.result).HAS_DOCUMENTATION_CHANGED }}" >> $GITHUB_OUTPUT
echo "HAS_PLASMA_TEMPLE=${{ fromJSON(steps.scope.outputs.result).HAS_PLASMA_TEMPLE }}" >> $GITHUB_OUTPUT
echo "HAS_PLASMA_B2C=${{ fromJSON(steps.scope.outputs.result).HAS_PLASMA_B2C }}" >> $GITHUB_OUTPUT
echo "HAS_PLASMA_WEB=${{ fromJSON(steps.scope.outputs.result).HAS_PLASMA_WEB }}" >> $GITHUB_OUTPUT
echo "HAS_PLASMA_UI=${{ fromJSON(steps.scope.outputs.result).HAS_PLASMA_UI }}" >> $GITHUB_OUTPUT
echo "HAS_PLASMA_HOPE=${{ fromJSON(steps.scope.outputs.result).HAS_PLASMA_HOPE }}" >> $GITHUB_OUTPUT
echo "HAS_PLASMA_ASDK=${{ fromJSON(steps.scope.outputs.result).HAS_PLASMA_ASDK }}" >> $GITHUB_OUTPUT
echo "HAS_CALDERA=${{ fromJSON(steps.scope.outputs.result).HAS_CALDERA }}" >> $GITHUB_OUTPUT
echo "HAS_CALDERA_ONLINE=${{ fromJSON(steps.scope.outputs.result).HAS_CALDERA_ONLINE }}" >> $GITHUB_OUTPUT
echo "HAS_SDDS_SRVC=${{ fromJSON(steps.scope.outputs.result).HAS_SDDS_SRVC }}" >> $GITHUB_OUTPUT
echo "HAS_SDDS_SERV=${{ fromJSON(steps.scope.outputs.result).HAS_SDDS_SERV }}" >> $GITHUB_OUTPUT
echo "HAS_ASSETS=${{ fromJSON(steps.scope.outputs.result).HAS_ASSETS }}" >> $GITHUB_OUTPUT
echo "PACKAGES_ENUMERATION=${{ fromJSON(steps.scope.outputs.result).PACKAGES_ENUMERATION }}" >> $GITHUB_OUTPUT
4 changes: 2 additions & 2 deletions .github/workflows/cypress-by-cron.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
strategy:
fail-fast: false
matrix:
scope: [web,b2c,ui,temple]
scope: [web,b2c,ui]

uses: ./.github/workflows/cypress-common.yml
with:
Expand All @@ -21,7 +21,7 @@ jobs:
strategy:
fail-fast: false
matrix:
scope: [web,b2c,ui,temple]
scope: [web,b2c,ui]

uses: ./.github/workflows/cypress-common.yml
with:
Expand Down
8 changes: 1 addition & 7 deletions .github/workflows/cypress-common.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,18 +29,12 @@ jobs:
- uses: ./.github/actions/prepare-environment

- name: Set default scope
if: ${{ inputs.scope != 'temple' }}
run: echo "SCOPE={b2c,web,core,hope,new-hope,icons,typo,tokens,tokens-b2c,tokens-b2b,tokens-web,tokens-utils,tokens-native,cy-utils,ui}" >> $GITHUB_ENV

- name: Set scope from "Plasma-temple"
if: ${{ inputs.scope == 'temple' }}
run: echo "SCOPE={b2c,web,core,hope,new-hope,icons,typo,tokens,tokens-b2c,tokens-b2b,tokens-web,tokens-utils,tokens-native,cy-utils,ui,temple}" >> $GITHUB_ENV
run: echo "SCOPE={b2c,web,core,hope,new-hope,icons,typo,tokens,tokens-b2c,tokens-utils,tokens-native,cy-utils,ui}" >> $GITHUB_ENV

- name: Install React 17
if: ${{ inputs.with-react-17 }}
run: |
npm i --no-progress react@17 react-dom@17 @types/[email protected] @types/react-dom@17 --prefix="./packages/plasma-ui"
npm i --no-progress react@17 react-dom@17 @types/[email protected] @types/react-dom@17 --prefix="./packages/plasma-temple"
npm i --no-progress react@17 react-dom@17 @types/[email protected] @types/react-dom@17 --prefix="./packages/plasma-b2c"
npm i --no-progress react@17 react-dom@17 @types/[email protected] @types/react-dom@17 --prefix="./packages/plasma-web"
Expand Down
22 changes: 0 additions & 22 deletions .github/workflows/cypress.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@ jobs:
# Важно что бы массив был со значениями, где `""` экранируются, например -> ["\"b2c\""]
# Можно для этого использовать JSON.stringify()
scope: ${{fromJson(needs.change-detection.outputs.SCOPE)}}
exclude:
- scope: temple

uses: ./.github/workflows/cypress-common.yml
with:
Expand All @@ -48,29 +46,9 @@ jobs:
fail-fast: false
matrix:
scope: ${{fromJson(needs.change-detection.outputs.SCOPE)}}
exclude:
- scope: temple

uses: ./.github/workflows/cypress-common.yml
with:
scope: ${{ matrix.scope }}
with-react-17: true
secrets: inherit

cypress-temple:
needs: change-detection-temple
if: ${{ needs.change-detection-temple.outputs.HAS_PLASMA_TEMPLE == 'true' }}
uses: ./.github/workflows/cypress-common.yml
with:
scope: 'temple'
secrets: inherit

cypress-temple-react-17:
needs: change-detection-temple
if: ${{ needs.change-detection-temple.outputs.HAS_PLASMA_TEMPLE == 'true' }}
uses: ./.github/workflows/cypress-common.yml
with:
scope: 'temple'
with-react-17: true
secrets: inherit

12 changes: 6 additions & 6 deletions .github/workflows/documentation-deploy-stage-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,10 @@ jobs:
npm run storybook:build --prefix="./packages/caldera-online"
cp -R ./packages/caldera-online/build-sb ./s3_build_sb/caldera-online-storybook
- name: Plasma "SDDS SRVC" Storybook
- name: Plasma "SDDS SERV" Storybook
run: |
npm run storybook:build --prefix="./packages/sdds-srvc"
cp -R ./packages/sdds-srvc/build-sb ./s3_build_sb/sdds-srvc-storybook
npm run storybook:build --prefix="./packages/sdds-serv"
cp -R ./packages/sdds-serv/build-sb ./s3_build_sb/sdds-serv-storybook
- name: Install s3cmd
run: pip3 install s3cmd
Expand Down Expand Up @@ -203,7 +203,7 @@ jobs:
./s3_build_sb/caldera-online-storybook/
s3://${{ secrets.AWS_S3_BUCKET_2 }}/caldera-online-storybook/
- name: Upload to S3 storybook "SDDS SRVC"
- name: Upload to S3 storybook "SDDS SERV"
run: >
s3cmd
--access_key ${{ secrets.AWS_ACCESS_KEY_ID }}
Expand All @@ -215,5 +215,5 @@ jobs:
--delete-removed
--no-mime-magic
sync
./s3_build_sb/sdds-srvc-storybook/
s3://${{ secrets.AWS_S3_BUCKET_DEV_STAGE }}/sdds-srvc-storybook/
./s3_build_sb/sdds-serv-storybook/
s3://${{ secrets.AWS_S3_BUCKET_DEV_STAGE }}/sdds-serv-storybook/
Loading

0 comments on commit ac46c1c

Please sign in to comment.