Unverified Commit a5887558 authored by Licho's avatar Licho Committed by GitHub

feat: add front service format (#2255)

* feat: add front service format Signed-off-by: 's avatarLicho <lecho.sun@gmail.com> * feat: add backend filter Signed-off-by: 's avatarLicho <lecho.sun@gmail.com> * fix: npm environment Signed-off-by: 's avatarLicho <lecho.sun@gmail.com> * fix Signed-off-by: 's avatarLicho <lecho.sun@gmail.com> * feat: only prettier Signed-off-by: 's avatarLicho <lecho.sun@gmail.com> * Spotless Apply * refactor: only dev Signed-off-by: 's avatarLicho <lecho.sun@gmail.com> --------- Signed-off-by: 's avatarLicho <lecho.sun@gmail.com> Co-authored-by: 's avatarleechor <leechor@users.noreply.github.com>
parent 31bf36ad
...@@ -55,7 +55,7 @@ jobs: ...@@ -55,7 +55,7 @@ jobs:
with: with:
filters: | filters: |
frontend: frontend:
- 'dlink-web/**' - 'dinky-web/**'
- uses: actions/setup-node@v3 - uses: actions/setup-node@v3
if: steps.filter.outputs.frontend == 'true' if: steps.filter.outputs.frontend == 'true'
with: with:
...@@ -71,16 +71,16 @@ jobs: ...@@ -71,16 +71,16 @@ jobs:
with: with:
path: | path: |
${{ steps.npm-cache-dir.outputs.dir }} ${{ steps.npm-cache-dir.outputs.dir }}
dlink-web/dist dinky-web/dist
key: ${{ runner.os }}-node-${{ hashFiles('dlink-web/**/package.json') }} key: ${{ runner.os }}-node-${{ hashFiles('dinky-web/**/package.json') }}
restore-keys: | restore-keys: |
${{ runner.os }}-node- ${{ runner.os }}-node-
- name: Install Dependencies - name: Install Dependencies
if: steps.filter.outputs.frontend == 'true' if: steps.filter.outputs.frontend == 'true'
run: cd dlink-web && npm install --prefer-offline --no-audit --progress=false --legacy-peer-deps run: cd dinky-web && npm install --prefer-offline --no-audit --progress=false --legacy-peer-deps
- name: Npm Web Build - name: Npm Web Build
if: steps.filter.outputs.frontend == 'true' if: steps.filter.outputs.frontend == 'true'
run: cd dlink-web && npm run build run: cd dinky-web && npm run build
build_jdk: build_jdk:
name: Build_JDK name: Build_JDK
runs-on: ubuntu-latest runs-on: ubuntu-latest
......
...@@ -22,8 +22,44 @@ jobs: ...@@ -22,8 +22,44 @@ jobs:
fetch-depth: 0 fetch-depth: 0
ref: ${{ github.head_ref }} ref: ${{ github.head_ref }}
token: ${{ secrets.TOKEN }} token: ${{ secrets.TOKEN }}
- uses: dorny/paths-filter@v2
id: filter
with:
filters: |
frontend:
- 'dinky-web/**'
backend:
- '!dinky-web/**'
- name: Run spotless apply - name: Run spotless apply
if: steps.filter.outputs.backend == 'true'
run : ./mvnw -T 4C -B --no-snapshot-updates clean spotless:apply -P flink-all run : ./mvnw -T 4C -B --no-snapshot-updates clean spotless:apply -P flink-all
- uses: actions/setup-node@v3
if: steps.filter.outputs.frontend == 'true'
with:
node-version: 16
- name: Get npm cache directory
id: npm-cache-dir
if: steps.filter.outputs.frontend == 'true'
run: |
echo "::set-output name=dir::$(npm config get cache)"
- uses: actions/cache@v3
id: npm-cache # use this to check for `cache-hit` ==> if: steps.npm-cache.outputs.cache-hit != 'true'
if: steps.filter.outputs.frontend == 'true'
with:
path: |
${{ steps.npm-cache-dir.outputs.dir }}
dinky-web/dist
key: ${{ runner.os }}-node-${{ hashFiles('dinky-web/**/package.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install Dependencies
if: steps.filter.outputs.frontend == 'true'
run: cd dinky-web && npm install --only=dev --prefer-offline --no-audit --progress=false --legacy-peer-deps
- name: Run frontend format
if: steps.filter.outputs.frontend == 'true'
run: cd dinky-web && npm run lint:prettier
- name: Check for modified files - name: Check for modified files
id: git-check id: git-check
run: | run: |
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment