Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: Migrate Frontend tests to a GHA Workflow #10923

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions .github/workflows/frontend.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Frontend Tests

on:
push:
branches:
- master
pull_request:
branches:
- master
paths:
- 'frontend/**'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should also add this workflow itself.

Suggested change
- 'frontend/**'
- 'frontend/**'
- '.github/workflows/frontend.yml'

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done, added this workflow to paths.

- '.github/workflows/frontend.yml'
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",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can also remove the ./scripts/report-coveralls.sh and frontend/scripts/get-coveralls-repo-token.js files. Seems like they are no longer referenced with this change.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done, removed these files.

"storybook": "start-storybook -p 6006 -s public",
"build:storybook": "build-storybook -s public"
},
Expand Down
23 changes: 0 additions & 23 deletions frontend/scripts/get-coveralls-repo-token.js

This file was deleted.

18 changes: 0 additions & 18 deletions frontend/scripts/report-coveralls.sh

This file was deleted.

Loading