Merge pull request #19 from natlibfi-jonollil/feature-dependabot-actions #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Automatic-node-tests | |
on: push | |
jobs: | |
build-node-versions: | |
name: Node version matrix | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [14.x, 16.x, 18.x, 20.x] | |
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/ | |
steps: | |
- name: Checkout the code | |
uses: actions/checkout@v4 # https://github.com/actions/checkout | |
- name: Setup Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v3 # https://github.com/actions/setup-node | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: 'npm' | |
env: | |
NPM_CONFIG_IGNORE_SCRIPTS: true | |
- run: npm audit --package-lock-only --production --audit-level=high | |
- run: npm i | |
- run: npm test | |
- run: npm run build --if-present |