Merge pull request #306 from intuitem/CA-344-add-github-workflows-to-… #696
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: Unit tests on CISO Assistant frontend | |
on: | |
push: | |
paths: | |
- "frontend/**" | |
env: | |
GITHUB_WORKFLOW: github_actions | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
env: | |
working-directory: ./frontend | |
strategy: | |
max-parallel: 4 | |
matrix: | |
node-version: ["20"] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up node ${{ matrix.node-version }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Install latest npm | |
working-directory: ${{env.working-directory}} | |
run: | | |
npm install -g npm && | |
npm --version && | |
npm list -g --depth 0 | |
- name: Install dependencies | |
working-directory: ${{env.working-directory}} | |
run: npm ci | |
- name: Run tests | |
working-directory: ${{env.working-directory}} | |
run: npm run test:ci |