Files
html5-boilerplate/.github/workflows/test.yml
Christian Oliff 07e9dc66b9 GitHub Actions Tidy-up (#3114)
- Allow CodeQL workflow to be run from GitHub Actions WebUI at any time
- Set CodeQL to also check for best practises/code problems (as well as security)
- Capitalize Publish GH Action
- Change Windows Test workflow for consistent file extension (also means its formatted with Prettier) and remove leading empty linebreak
- Run Prettier (maybe we should add this to build script to ensure all code is formatted?)
- Change .gitattributes to have LF line-endings for more file types
2024-04-23 13:16:32 -04:00

36 lines
850 B
YAML

name: Build status (Ubuntu)
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