advweb-grp1 / advanced-web-final-year-project

Final year advanced web develop unit project
MIT License
1 stars 0 forks source link

core/workflow-testing #21

Closed rwx-yxu closed 1 year ago

rwx-yxu commented 1 year ago

Modify github actions to run cypress and vitest. We currently don't have any tests at the moment so this is low priority.

LiamSingh64 commented 1 year ago

I will add a dummy test for Cypress (e2e) and Vitest (unit-testing) in the appropriate locations, probably just the example ones given from the course slides.

I will then run them just from the terminal to make sure they work as intended, and add the command to run these tests to the Workflow.

More useful tests can later be added to the test scripts.

LiamSingh64 commented 1 year ago

Project already has example tests to run

e2e tests are run with npm run test:e2e and Unit Tests are run with npm run test:unit

LiamSingh64 commented 1 year ago

vitest.config.js had wrong path to import vite.config.js, don't know why, fixed it but not sure if that will mess anything up when the code gets merged and you guys try running it? Like, I don't know if that was just an error on my machine?

LiamSingh64 commented 1 year ago

Commands to run tests work as expected, now just need to add these to the Actions Workflow

LiamSingh64 commented 1 year ago

Not sure if there is a certain way of adding more commands and I've never used .yaml before so I just appended the run test commands after the npm run build command.

LiamSingh64 commented 1 year ago

23 PR Opened and workflow ran successfully, just waiting for any reviewers comments