-
Notifications
You must be signed in to change notification settings - Fork 141
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
Create simulator-tests.yml Workflow for simulator tests #378
base: main
Are you sure you want to change the base?
Changes from all commits
c1519f8
8e663ce
1819323
e041978
cd8af06
746ddef
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
name: Runs All Simulator tests | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
branches: [main] | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
node-version: [20.x] | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
cache: "npm" | ||
- name: Install dependencies | ||
run: npm ci | ||
- name: Execute Simulator tests | ||
run: npm run test |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
@@ -22,6 +22,9 @@ import { createRouter, createWebHistory } from 'vue-router'; | |||||||||
import i18n from '#/locales/i18n'; | ||||||||||
import vuetify from '#/plugins/vuetify'; | ||||||||||
import { routes } from '#/router'; | ||||||||||
import ResizeObserver from 'resize-observer-polyfill'; | ||||||||||
|
||||||||||
global.ResizeObserver = ResizeObserver; | ||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Assignment to global.ResizeObserver Assigning the imported Consider adding a check to ensure that + if (!global.ResizeObserver) {
+ global.ResizeObserver = ResizeObserver;
+ } Committable suggestion
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @niladrix719 Why are we always relying on polyfill even if the feature available on the browser ? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||||||||||
|
||||||||||
vi.mock('codemirror', async (importOriginal) => { | ||||||||||
const actual = await importOriginal(); | ||||||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://caniuse.com/resizeobserver It is already available on 95% of the browsers, I don't think we should be using this polyfill unless necessary.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was working fine locally without any polyfill, but it was failing in the GitHub workflow
https://github.com/CircuitVerse/cv-frontend-vue/actions/runs/10736591287/job/29776330239