mirror of
https://github.com/actions/http-client.git
synced 2025-04-22 02:02:29 +00:00
ci(workflow): add 'npm' cache for actions/setup-node in .github/workflows
This commit is contained in:
parent
5ea1c52929
commit
456dffc925
48
.github/workflows/test.yml
vendored
48
.github/workflows/test.yml
vendored
@ -1,16 +1,15 @@
|
||||
name: http-tests
|
||||
on:
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
paths-ignore:
|
||||
- '**.md'
|
||||
- "**.md"
|
||||
pull_request:
|
||||
paths-ignore:
|
||||
- '**.md'
|
||||
- "**.md"
|
||||
|
||||
jobs:
|
||||
|
||||
build:
|
||||
name: Build
|
||||
|
||||
@ -23,29 +22,30 @@ jobs:
|
||||
runs-on: ${{ matrix.runs-on }}
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Setup node
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
- name: Setup node
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
cache: npm
|
||||
|
||||
- name: npm install
|
||||
run: npm install
|
||||
- name: npm install
|
||||
run: npm install
|
||||
|
||||
- name: Compile
|
||||
run: npm run build
|
||||
- name: Compile
|
||||
run: npm run build
|
||||
|
||||
- name: npm test
|
||||
run: npm test
|
||||
- name: npm test
|
||||
run: npm test
|
||||
|
||||
- name: Format
|
||||
shell: bash
|
||||
run: npm run format-check
|
||||
if: matrix.runs-on == 'ubuntu-latest'
|
||||
- name: Format
|
||||
shell: bash
|
||||
run: npm run format-check
|
||||
if: matrix.runs-on == 'ubuntu-latest'
|
||||
|
||||
- name: audit security
|
||||
continue-on-error: true
|
||||
run: npm audit --audit-level=moderate
|
||||
if: matrix.runs-on == 'ubuntu-latest'
|
||||
- name: audit security
|
||||
continue-on-error: true
|
||||
run: npm audit --audit-level=moderate
|
||||
if: matrix.runs-on == 'ubuntu-latest'
|
||||
|
Loading…
Reference in New Issue
Block a user