Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

plasm-infra: Split lint and unit tests to different jobs #631

Merged
merged 2 commits into from
Aug 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Lint/Unit tests
name: Required primary checks

on:
merge_group:
Expand All @@ -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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

я же правильно помню что потом мы разделим линтер по пакетам и втащим --since ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Yeti-or Да все правильно, у нас есть задача на это.


- 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

Expand Down
1 change: 1 addition & 0 deletions packages/plasma-hope/src/components/Button/Button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ const componentMap = {
b2c: ButtonB2C,
};

// WIP
export const Button = ({ design }: Design) => {
const ButtonView = createButton<HTMLButtonElement, ButtonProps>(componentMap[design]);

Expand Down