Skip to content

Commit

Permalink
build ui package in code check workflow & cache uip-package dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
pk910 committed Dec 6, 2024
1 parent d5a72a3 commit 945601c
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .github/workflows/_shared-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,19 @@ jobs:
node-version: 20.x
cache: 'npm'
cache-dependency-path: ./ui-package/package-lock.json
- name: Cache node modules
id: cache-npm
uses: actions/cache@v3
env:
cache-name: cache-node-modules
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ./ui-package/node_modules
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('./ui-package/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
# build UI package
- name: Build UI package
Expand Down
26 changes: 26 additions & 0 deletions .github/workflows/_shared-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,25 @@ jobs:
uses: actions/setup-go@v4
with:
go-version: 1.22.x
- name: Set up node
uses: actions/setup-node@v4
with:
node-version: 20.x
cache: 'npm'
cache-dependency-path: ./ui-package/package-lock.json
- name: Cache node modules
id: cache-npm
uses: actions/cache@v3
env:
cache-name: cache-node-modules
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ./ui-package/node_modules
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('./ui-package/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Prepare test environment
run: mkdir -p ui-package/dist && touch ui-package/dist/dummy
Expand All @@ -41,3 +60,10 @@ jobs:

- name: Run tests
run: go test -race -vet=off ./...


# build UI package
- name: Build UI package
run: |
make build-ui

0 comments on commit 945601c

Please sign in to comment.