Skip to content

Update and Split Trivy #33

Update and Split Trivy

Update and Split Trivy #33

Workflow file for this run

name: UI Unit Tests
on:
pull_request:
paths:
- "ui/**"
jobs:
test:
runs-on: ubuntu-latest
env:
UI_PATH: ./ui
HADOLINT_URL: https://github.com/hadolint/hadolint/releases/download/v2.10.0/hadolint-Linux-x86_64
NPM_VERSION: 9
steps:
- name: Checkout the code
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # actions/[email protected]
- name: Setup node from node version file
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # actions/[email protected]
with:
node-version-file: "${{ env.UI_PATH }}/.nvmrc"
- name: Set up the npm version
run: npm install --global npm@$NPM_VERSION
- name: Install npm packages
run: make -C $UI_PATH install
- name: Install hadolinter and check sha
run: wget --quiet -O ./hadolint $HADOLINT_URL && sha512sum -c hadolint.sha512 && chmod 0766 ./hadolint
working-directory: ${{ env.UI_PATH }}
- name: Run precommit checks (linting & testing etc)
run: make -C $UI_PATH precommit