Skip to content

Commit

Permalink
Add npm cache (vmware-archive#2743)
Browse files Browse the repository at this point in the history
Signed-off-by: Sam Foo <foos@vmware.com>
  • Loading branch information
Sam Foo authored and wwitzel3 committed Aug 30, 2021
1 parent ff7d861 commit 2f33011
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 15 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/electron.yaml
Expand Up @@ -11,13 +11,15 @@ jobs:
runs-on: ${{ matrix.os }}

steps:
- uses: actions/setup-node@v2.3.2
- uses: actions/checkout@v2
- uses: actions/setup-node@v2.4.0
with:
node-version: '16'
cache: 'npm'
cache-dependency-path: 'web/package-lock.json'
- uses: actions/setup-go@v2
with:
go-version: 1.16.x
- uses: actions/checkout@v2
- name: Build binary
env:
GOFLAGS: -mod=vendor
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/lint.yaml
Expand Up @@ -13,10 +13,10 @@ jobs:
go_linter:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: 1.16.x
- uses: actions/checkout@v2
- name: go vet
env:
GOFLAGS: -mod=vendor
Expand All @@ -26,13 +26,15 @@ jobs:
eslint:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-node@v2.3.2
- uses: actions/checkout@v2
- uses: actions/setup-node@v2.4.0
with:
node-version: '16'
cache: 'npm'
cache-dependency-path: 'web/package-lock.json'
- uses: actions/setup-go@v2
with:
go-version: 1.16.x
- uses: actions/checkout@v2
- name: eslint
run: |
go run build.go web-lint
8 changes: 5 additions & 3 deletions .github/workflows/nightly.yaml
Expand Up @@ -10,13 +10,15 @@ jobs:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/setup-node@v2.3.2
- uses: actions/checkout@v2
- uses: actions/setup-node@v2.4.0
with:
node-version: '16'
cache: 'npm'
cache-dependency-path: 'web/package-lock.json'
- uses: actions/setup-go@v2
with:
go-version: 1.16.x
- uses: actions/checkout@v2
- name: Build web assets
run: |
go run build.go web-build
Expand Down Expand Up @@ -45,7 +47,7 @@ jobs:
name: Run goreleaser
needs: [nightly-build]
runs-on: ubuntu-latest
container: goreleaser/goreleaser:v0.161.0
container: goreleaser/goreleaser:v0.174.2
steps:
- uses: actions/checkout@v2
with:
Expand Down
20 changes: 13 additions & 7 deletions .github/workflows/preflight-checks.yaml
Expand Up @@ -21,13 +21,15 @@ jobs:
runs-on: ${{ matrix.platform }}
name: Golang tests on ${{ matrix.platform }}
steps:
- uses: actions/setup-node@v2.3.2
- uses: actions/checkout@v2
- uses: actions/setup-node@v2.4.0
with:
node-version: '16'
cache: 'npm'
cache-dependency-path: 'web/package-lock.json'
- uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go-version }}
- uses: actions/checkout@v2
- name: install_prettier
run: |
npm i -g prettier
Expand Down Expand Up @@ -59,10 +61,12 @@ jobs:
runs-on: ${{ matrix.platform }}
name: Karma tests on ${{ matrix.platform }}
steps:
- uses: actions/setup-node@v2.3.2
- uses: actions/checkout@v2
- uses: actions/setup-node@v2.4.0
with:
node-version: '16'
- uses: actions/checkout@v2
cache: 'npm'
cache-dependency-path: 'web/package-lock.json'
- name: run_karma
run: |
go run build.go web-test
Expand All @@ -77,13 +81,15 @@ jobs:
runs-on: ${{ matrix.platform }}
name: Build on ${{ matrix.platform }}
steps:
- uses: actions/setup-node@v2.3.2
- uses: actions/checkout@v2
- uses: actions/setup-node@v2.4.0
with:
node-version: '16'
cache: 'npm'
cache-dependency-path: 'web/package-lock.json'
- uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go-version }}
- uses: actions/checkout@v2
- name: Build web assets
run: |
go run build.go web-build
Expand Down Expand Up @@ -127,7 +133,7 @@ jobs:
if: startsWith(github.ref, 'refs/tags/v')
needs: [bundle_assets, verify_tag]
runs-on: ubuntu-latest
container: goreleaser/goreleaser:v0.161.0
container: goreleaser/goreleaser:v0.174.2
steps:
- uses: actions/checkout@v2
with:
Expand Down

0 comments on commit 2f33011

Please sign in to comment.