-
Notifications
You must be signed in to change notification settings - Fork 20
68 lines (52 loc) · 2.05 KB
/
required-primary-checks.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
name: Required primary checks
on:
merge_group:
pull_request:
branches:
- dev
- master
concurrency:
# New commit on branch cancels running workflows of the same branch
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,tokens-native}"
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Prepare environment
uses: ./.github/actions/prepare-environment
- name: Lerna bootstrap
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
- name: Prepare environment
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
- name: Setup React 17
run: |
npm i --no-progress --no-audit react@17 react-dom@17 @types/[email protected] @types/react-dom@17 --prefix="./packages/plasma-ui"
npm i --no-progress --no-audit react@17 react-dom@17 @types/[email protected] @types/react-dom@17 --prefix="./packages/plasma-temple"
npm i --no-progress --no-audit react@17 react-dom@17 @types/[email protected] @types/react-dom@17 --prefix="./packages/plasma-b2c"
npm i --no-progress --no-audit react@17 react-dom@17 @types/[email protected] @types/react-dom@17 --prefix="./packages/plasma-web"
- name: Lerna bootstrap by scope
run: npx lerna bootstrap --scope=@salutejs/plasma-{ui,web,b2c,temple,hope,core}
- name: Unit tests for React 17
run: npm run test -- --scope=@salutejs/plasma-{ui,web,b2c,temple}