Skip to content

Update and Split Trivy #36

Update and Split Trivy

Update and Split Trivy #36

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: 10
steps:
- name: Checkout the code
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # actions/[email protected]
- name: Setup node from node version file
uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # 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