mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
ci: build & lint ui only when related files change (#384)
This commit is contained in:
1 parent
74a7d760cb
commit
5dd7fe935b
1 file changed
+16
-2
@@ -19,6 +19,7 @@ jobs:
|
|||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
|
fetch-depth: 2
|
||||||
- name: Set up Node
|
- name: Set up Node
|
||||||
uses: actions/setup-node@v1
|
uses: actions/setup-node@v1
|
||||||
with:
|
with:
|
||||||
@@ -42,10 +43,23 @@ jobs:
|
|||||||
git config --global user.name undefined
|
git config --global user.name undefined
|
||||||
git config --global user.email i@undefined.moe
|
git config --global user.email i@undefined.moe
|
||||||
yarn
|
yarn
|
||||||
|
- name: Get specific changed files
|
||||||
|
id: ui-changed-files
|
||||||
|
uses: tj-actions/changed-files@v23.1
|
||||||
|
with:
|
||||||
|
files: |
|
||||||
|
/package.json
|
||||||
|
.eslint*
|
||||||
|
packages/ui-default/**
|
||||||
|
packages/utils/**
|
||||||
- name: Build And Lint
|
- name: Build And Lint
|
||||||
run: |
|
run: |
|
||||||
yarn build:ui:gulp
|
if [[ ${{ steps.ui-changed-files.outputs.any_changed }} == true ]]
|
||||||
parallel --tty -j+0 yarn ::: lint:ci lint:ui:ci build build:ui:production:webpack test
|
then
|
||||||
|
parallel --tty -j+0 yarn ::: lint:ci lint:ui:ci build build:ui:production test
|
||||||
|
else
|
||||||
|
parallel --tty -j+0 yarn ::: lint:ci build test
|
||||||
|
fi
|
||||||
env:
|
env:
|
||||||
PT_PROJECT_TOKEN: ${{ secrets.PT_PROJECT_TOKEN }}
|
PT_PROJECT_TOKEN: ${{ secrets.PT_PROJECT_TOKEN }}
|
||||||
- name: Publish
|
- name: Publish
|
||||||
|
|||||||
Reference in new issue
Block a user