28 lines
768 B
YAML
28 lines
768 B
YAML
name: test
|
|
on: push
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 1
|
|
strategy:
|
|
matrix:
|
|
node-version: [18.x]
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
- name: Use Node.js ${{ matrix.node-version }}
|
|
uses: actions/setup-node@v3
|
|
with:
|
|
node-version: ${{ matrix.node-version }}
|
|
- name: Cache node_modules
|
|
id: cache-node-modules
|
|
uses: actions/cache@v3
|
|
with:
|
|
key: ${{ runner.os }}-${{ matrix.node-version }}-${{ hashFiles('**/package-lock.json') }}
|
|
path: node_modules
|
|
- name: Install dependencies
|
|
if: steps.cache-node-modules.outputs.cache-hit != 'true'
|
|
run: npm ci
|
|
- name: Run tests
|
|
run: npm test
|