mirror of
https://github.com/h5bp/html5-boilerplate.git
synced 2026-01-09 14:48:02 -05:00
* node 18+ * Remove LGTM mention (service is no longer available) --------- Co-authored-by: Christian Oliff <christianoliff@pm.me>
36 lines
841 B
YAML
36 lines
841 B
YAML
name: Build status
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
branches: [main]
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
node-version: [18.x, 20.x]
|
|
steps:
|
|
- name: Get npm cache directory
|
|
id: npm-cache
|
|
run: |
|
|
echo "dir=$(npm config get cache)" >> "$GITHUB_OUTPUT"
|
|
- uses: actions/cache@v3
|
|
with:
|
|
path: ${{ steps.npm-cache.outputs.dir }}
|
|
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-node-
|
|
- uses: actions/checkout@v4
|
|
- name: Run tests ${{ matrix.node-version }}
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: ${{ matrix.node-version }}
|
|
- run: npm ci
|
|
- run: npm test
|