diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml index 598e1f6..191f41a 100644 --- a/.github/workflows/nodejs.yml +++ b/.github/workflows/nodejs.yml @@ -8,31 +8,15 @@ jobs: runs-on: 'ubuntu-latest' strategy: matrix: - node_version: [12, 14, 16] + node_version: [12, 14, 16, 18, 20, 22] os: ['ubuntu-latest'] steps: - - name: 'Checkout' - uses: 'actions/checkout@master' - - - name: 'Use Node.js ${{ matrix.node_version }}' - uses: 'actions/setup-node@v2' + - uses: actions/checkout@v4 with: - node-version: '${{ matrix.node_version }}' - - - name: 'Cache node modules' - uses: 'actions/cache@v2' - env: - cache-name: 'cache-node-modules' + persist-credentials: false + - uses: actions/setup-node@v4 with: - path: '~/.npm' # npm cache files are stored in `~/.npm` on Linux/macOS - key: "${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}" - restore-keys: | - ${{ runner.os }}-build-${{ env.cache-name }}- - ${{ runner.os }}-build- - ${{ runner.os }}- - - - name: 'Install Dependencies' - run: 'npm ci' - - - name: 'Run Tests' - run: 'npm test' + node-version: ${{ matrix.node_version }} + cache: 'npm' + - run: npm ci --ignore-scripts + - run: npm test