Skip to content
This repository has been archived by the owner on May 3, 2022. It is now read-only.

ci(workflow): add cache to workflows using actions/setup-node #57

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
48 changes: 24 additions & 24 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -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'