Skip to content

Commit

Permalink
feat: add front service format (#2255)
Browse files Browse the repository at this point in the history
* feat: add front service format

Signed-off-by: Licho <[email protected]>

* feat: add backend filter

Signed-off-by: Licho <[email protected]>

* fix: npm environment

Signed-off-by: Licho <[email protected]>

* fix

Signed-off-by: Licho <[email protected]>

* feat: only prettier

Signed-off-by: Licho <[email protected]>

* Spotless Apply

* refactor: only dev

Signed-off-by: Licho <[email protected]>

---------

Signed-off-by: Licho <[email protected]>
Co-authored-by: leechor <[email protected]>
  • Loading branch information
leechor and leechor authored Aug 22, 2023
1 parent 31bf36a commit a588755
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 5 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/backend.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
with:
filters: |
frontend:
- 'dlink-web/**'
- 'dinky-web/**'
- uses: actions/setup-node@v3
if: steps.filter.outputs.frontend == 'true'
with:
Expand All @@ -71,16 +71,16 @@ jobs:
with:
path: |
${{ steps.npm-cache-dir.outputs.dir }}
dlink-web/dist
key: ${{ runner.os }}-node-${{ hashFiles('dlink-web/**/package.json') }}
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 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
if: steps.filter.outputs.frontend == 'true'
run: cd dlink-web && npm run build
run: cd dinky-web && npm run build
build_jdk:
name: Build_JDK
runs-on: ubuntu-latest
Expand Down
36 changes: 36 additions & 0 deletions .github/workflows/format_code.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,44 @@ jobs:
fetch-depth: 0
ref: ${{ github.head_ref }}
token: ${{ secrets.TOKEN }}
- uses: dorny/paths-filter@v2
id: filter
with:
filters: |
frontend:
- 'dinky-web/**'
backend:
- '!dinky-web/**'
- name: Run spotless apply
if: steps.filter.outputs.backend == 'true'
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
id: git-check
run: |
Expand Down

0 comments on commit a588755

Please sign in to comment.