mirror of
https://github.com/actions/setup-go.git
synced 2025-04-23 17:40:50 +00:00
ci(workflow): add 'npm' cache for actions/setup-node in .github/workflows
This commit is contained in:
parent
3b4dc6cbed
commit
faea055eca
1 changed files with 18 additions and 17 deletions
35
.github/workflows/workflow.yml
vendored
35
.github/workflows/workflow.yml
vendored
|
@ -4,10 +4,10 @@ on:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
paths-ignore:
|
paths-ignore:
|
||||||
- '**.md'
|
- "**.md"
|
||||||
pull_request:
|
pull_request:
|
||||||
paths-ignore:
|
paths-ignore:
|
||||||
- '**.md'
|
- "**.md"
|
||||||
jobs:
|
jobs:
|
||||||
run:
|
run:
|
||||||
name: Run
|
name: Run
|
||||||
|
@ -16,23 +16,24 @@ jobs:
|
||||||
matrix:
|
matrix:
|
||||||
operating-system: [ubuntu-latest, windows-latest]
|
operating-system: [ubuntu-latest, windows-latest]
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
- name: Setup node 12
|
- name: Setup node 12
|
||||||
uses: actions/setup-node@v1
|
uses: actions/setup-node@v2
|
||||||
with:
|
with:
|
||||||
node-version: 12
|
node-version: 12
|
||||||
|
cache: npm
|
||||||
|
|
||||||
- name: npm install
|
- name: npm install
|
||||||
run: npm install
|
run: npm install
|
||||||
|
|
||||||
- name: Lint
|
- name: Lint
|
||||||
run: npm run format-check
|
run: npm run format-check
|
||||||
|
|
||||||
- name: npm test
|
- name: npm test
|
||||||
run: npm test
|
run: npm test
|
||||||
|
|
||||||
- name: audit packages
|
- name: audit packages
|
||||||
run: npm audit --audit-level=high
|
run: npm audit --audit-level=high
|
||||||
if: matrix.operating-system == 'ubuntu-latest'
|
if: matrix.operating-system == 'ubuntu-latest'
|
||||||
|
|
Loading…
Add table
Reference in a new issue