-
Notifications
You must be signed in to change notification settings - Fork 6
36 lines (28 loc) · 1.07 KB
/
test_ui.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
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