Skip to content

Build: Improve security of the GitHub Actions setup #107

Build: Improve security of the GitHub Actions setup

Build: Improve security of the GitHub Actions setup #107

Workflow file for this run

name: CI
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
# Node.js 10 is required by jQuery infra
NODE_VERSION: [10.x, 18.x]
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Cache
uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ matrix.NODE_VERSION }}-npm-lock-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-${{ matrix.NODE_VERSION }}-npm-lock-
- name: Use Node.js ${{ matrix.NODE_VERSION }}
uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1
with:
node-version: ${{ matrix.NODE_VERSION }}
- name: Install npm dependencies
run: npm install
- name: Run test
run: npm run ci