Skip to content

Commit

Permalink
Migrate Frontend tests to a GHA Workflow
Browse files Browse the repository at this point in the history
Signed-off-by: ddalvi <[email protected]>
  • Loading branch information
DharmitD committed Jun 18, 2024
1 parent 4dab191 commit f5e1aef
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 1 deletion.
35 changes: 35 additions & 0 deletions .github/workflows/frontend.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Frontend Tests

on:
push:
branches:
- master
pull_request:
branches:
- master
paths:
- 'frontend/**'
workflow_dispatch:

jobs:
frontend-tests:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '14'

- name: Clean npm cache
run: npm cache clean --force

- name: Install dependencies
run: cd ./frontend && npm ci

- name: Run Frontend Tests
run: cd ./frontend && npm run test:ci

1 change: 0 additions & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@
"test:server:coverage": "cd ./server && npm test -- --coverage && cd ..",
"test:coverage": "npm test -- --coverage && npm run test:server:coverage",
"test:ci": "export CI=true && npm run format:check && npm run lint && npm run test:coverage",
"test:ci:prow": "npm set unsafe-perm true && npm ci && npm run test:ci && ./scripts/report-coveralls.sh",
"storybook": "start-storybook -p 6006 -s public",
"build:storybook": "build-storybook -s public"
},
Expand Down

0 comments on commit f5e1aef

Please sign in to comment.