From 2655bd5864f136a6b46c95180a39b6b27deef43f Mon Sep 17 00:00:00 2001 From: Alexander Lobyntsev Date: Thu, 27 Jul 2023 15:57:35 +0700 Subject: [PATCH 1/2] ci: split lint and unit tests to different jobs --- ...{tests.yml => required-primary-checks.yml} | 40 +++++++++++-------- 1 file changed, 24 insertions(+), 16 deletions(-) rename .github/workflows/{tests.yml => required-primary-checks.yml} (69%) diff --git a/.github/workflows/tests.yml b/.github/workflows/required-primary-checks.yml similarity index 69% rename from .github/workflows/tests.yml rename to .github/workflows/required-primary-checks.yml index 3800a29162..7c1688c47d 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/required-primary-checks.yml @@ -1,4 +1,4 @@ -name: Lint/Unit tests +name: Required primary checks on: merge_group: @@ -12,33 +12,41 @@ concurrency: group: ${{ github.workflow }}-${{ github.head_ref }} cancel-in-progress: true +env: + GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} + NPM_REGISTRY_TOKEN: ${{ secrets.NPM_REGISTRY_TOKEN }} + LERNA_IGNORE_LIST: "@salutejs/plasma-{temple-docs,ui-docs,docs-ui,web-docs,website,cy-utils,sb-utils}" + jobs: - scope: - uses: ./.github/workflows/change-detection.yml - secrets: inherit - - build: - needs: scope - name: Build - if: ${{ needs.scope.outputs.HAS_SCOPE == 'true' }} + lint: + name: Lint runs-on: ubuntu-latest - env: - GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} - NPM_REGISTRY_TOKEN: ${{ secrets.NPM_REGISTRY_TOKEN }} - SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} + steps: - uses: actions/checkout@v3 - with: - fetch-depth: 0 - uses: ./.github/actions/prepare-environment - name: Lerna bootstrap - run: npx lerna bootstrap --ignore @salutejs/plasma-tokens* + run: npx lerna bootstrap - name: Lint run: npm run lint + tests: + name: Unit Tests + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - uses: ./.github/actions/prepare-environment + + - name: Lerna bootstrap + run: npx lerna bootstrap --since=$(git merge-base --fork-point origin/dev) --ignore=${{env.LERNA_IGNORE_LIST}} + - name: Unit tests run: npm run test From b5fd8ae6d60fd395ffea3185bd57e09ae831eb77 Mon Sep 17 00:00:00 2001 From: Alexander Lobyntsev Date: Fri, 28 Jul 2023 16:39:53 +0700 Subject: [PATCH 2/2] ci: test --- packages/plasma-hope/src/components/Button/Button.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/plasma-hope/src/components/Button/Button.tsx b/packages/plasma-hope/src/components/Button/Button.tsx index 1f43972677..3b7d2c5b36 100644 --- a/packages/plasma-hope/src/components/Button/Button.tsx +++ b/packages/plasma-hope/src/components/Button/Button.tsx @@ -10,6 +10,7 @@ const componentMap = { b2c: ButtonB2C, }; +// WIP export const Button = ({ design }: Design) => { const ButtonView = createButton(componentMap[design]);