Skip to content

[Snyk] Security upgrade express from 4.17.1 to 4.20.0 #239

[Snyk] Security upgrade express from 4.17.1 to 4.20.0

[Snyk] Security upgrade express from 4.17.1 to 4.20.0 #239

Workflow file for this run

name: Lint, test and build
# By default, runs when a pull request is opened, synchronized, or reopened.
on: pull_request
jobs:
lint_and_test:
name: Lint, test and build
runs-on: ubuntu-latest
env:
# Increase RAM limit, and make uncaught exceptions crash (default in 16+).
NODE_OPTIONS: --max_old_space_size=4096 --unhandled-rejections=strict
steps:
- name: Checkout
uses: actions/checkout@v1.0.0
- name: Setup node
uses: actions/setup-node@v1
with:
node-version: '14.x'
- name: Cache node_modules
uses: actions/cache@v1
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install
run: npm ci
# Checks to see if any files in the PR match one of the listed file types.
# We can use this filter to decide whether or not to run linters or tests.
# You can check if a file with a listed file type is in the PR by doing:
# if: ${{ steps.filter.outputs.md == 'true' }}
# This will return true if there's a markdown file that was changed
# in the PR.
- uses: dorny/paths-filter@v2.2.1
id: filter
with:
filters: |
md:
- '**/*.md'
js:
- '**/*.js'
json:
- '**/*.json'
yml:
- '**/*.yml'
scss:
- '**/*.scss'
njk:
- '**/*.njk'
_external:
- 'external/**/*'
# Use the filter to check if files with a specific file type were changed
# in the PR. If they were, run the relevant linters. Otherwise, skip.
- name: Lint Markdown
if: ${{ steps.filter.outputs.md == 'true' }}
run: npm run lint:md
- name: Lint JavaScript
if: ${{ steps.filter.outputs.js == 'true' || steps.filter.outputs.json == 'true' }}
run: npm run lint:js && npm run lint:types
- name: Build JavaScript
if: ${{ steps.filter.outputs.js == 'true' || steps.filter.outputs.json == 'true' }}
run: npm run rollup
- name: Lint SCSS
if: ${{ steps.filter.outputs.scss == 'true' }}
run: npm run lint:scss
- name: Build External
if: ${{ steps.filter.outputs._external == 'true' }}
run: npm run build-external
- name: Build Eleventy
if: ${{ steps.filter.outputs.md == 'true' || steps.filter.outputs.js == 'true' || steps.filter.outputs.yml == 'true' || steps.filter.outputs.njk == 'true' }}
run: npm run ignore && npm run maybe-sync-external && npm run eleventy
# Only run tests if the PR touches behavior related files.
- name: Test
if: ${{ steps.filter.outputs.js == 'true' || steps.filter.outputs.json == 'true' || steps.filter.outputs.yml == 'true' || steps.filter.outputs.njk == 'true'}}
run: npm run test