From f5e1aefc6b919cf82c325b7ff425cf4b6ce9b68c Mon Sep 17 00:00:00 2001 From: ddalvi Date: Tue, 18 Jun 2024 09:58:07 -0400 Subject: [PATCH] Migrate Frontend tests to a GHA Workflow Signed-off-by: ddalvi --- .github/workflows/frontend.yml | 35 ++++++++++++++++++++++++++++++++++ frontend/package.json | 1 - 2 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/frontend.yml diff --git a/.github/workflows/frontend.yml b/.github/workflows/frontend.yml new file mode 100644 index 000000000000..2d17b1d1addc --- /dev/null +++ b/.github/workflows/frontend.yml @@ -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 + \ No newline at end of file diff --git a/frontend/package.json b/frontend/package.json index be8929f3964b..cff25bb3cf86 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -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" },