forked from netless-io/flat
-
Notifications
You must be signed in to change notification settings - Fork 0
85 lines (76 loc) · 2.67 KB
/
check-code.yml
File metadata and controls
85 lines (76 loc) · 2.67 KB
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
name: Code Check
on:
pull_request:
branches:
- main
- dev
paths-ignore:
- "docs/**"
- "*.md"
- ".yarnrc"
- "LICENSE"
jobs:
check-code:
runs-on: macos-10.15
steps:
- name: Checkout
uses: actions/checkout@v2
- uses: dorny/paths-filter@v2
id: filter
with:
filters: |
i18n: &i18n
- 'packages/flat-i18n/locales/*.json'
components: &components
- 'packages/flat-components/**/*.(ts|tsx|css|less)'
# e.g: package.json / tsconfig.json rollup.config.js eslintrc.js
- 'packages/flat-components/*.(js|json)'
- 'packages/flat-components/.eslintignore'
types: &types
- 'packages/flat-types/*.json'
- 'packages/flat-types/**/*.ts'
renderer:
- *components
- *types
- 'desktop/renderer-app/*.(js|json)'
- 'desktop/renderer-app/.eslintignore'
- 'desktop/renderer-app/webpack/**'
- 'desktop/renderer-app/typings/**'
- 'desktop/renderer-app/**/*.(ts|tsx|css|less)'
main:
- *types
- 'desktop/main-app/*.(js|json)'
- 'desktop/main-app/.eslintignore'
- 'desktop/main-app/webpack/**'
- 'desktop/main-app/typings/**'
- 'desktop/main-app/**/*.ts'
flat-web:
- 'web/flat-web/**/*.(ts|tsx)'
- name: Install NodeJS
uses: actions/setup-node@v2
with:
node-version: "15.10.0"
- name: Install changed package dependencies and build packages
run: |-
if node ./scripts/ci/install-changed-package-dependencies.js; then
# failure automatically retries 3 times
yarn run bootstrap || yarn run bootstrap || yarn run bootstrap
fi
env:
components: ${{ steps.filter.outputs.components }}
types: ${{ steps.filter.outputs.types }}
renderer: ${{ steps.filter.outputs.renderer }}
main: ${{ steps.filter.outputs.main }}
flatWeb: ${{ steps.filter.outputs.flat-web }}
- name: Build renderer
run: yarn workspace renderer-app build
if: steps.filter.outputs.renderer == 'true'
- name: Build main
run: yarn workspace flat build:main
if: steps.filter.outputs.main == 'true'
- name: Build flat-web
run: yarn workspace flat-web build
if: steps.filter.outputs.flat-web == 'true'
- name: Check i18n
run: node packages/flat-i18n/scripts/check.js
if: steps.filter.outputs.i18n == 'true'