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

Qe GitHub workflow #466

Open
wants to merge 13 commits into
base: main
Choose a base branch
from
28 changes: 28 additions & 0 deletions .github/workflows/cypress_and_jest_test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Cypress and Jest Tests

on: [push]

jobs:
cypress-run:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
build: npm run build
# Install NPM dependencies, cache them correctly
# and run all Cypress tests
- name: Create mongoDB Docker container
run: sudo docker run -d -p 27017:27017 mongo:latest
- name: run cypress integration tests
uses: cypress-io/github-action@v4.1.0 # use the explicit version number
with:
wait-on: "http://localhost:3030"
config-file: cypress.config.cjs
# build: npm run build
start: npm run start:test
env:
MONGODB_URI: "mongodb://0.0.0.0:27017/"
MONGODB_DATABASE: "acebook_test"
- name: run jest unit tests
run: npm run test:unit
10 changes: 10 additions & 0 deletions README_QE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
## README_QE

# Hi!
Here you will find anything from the QE team that
is worth checking from time to time.
We will update this in-line with the project.




10 changes: 10 additions & 0 deletions cypress.config.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
const { defineConfig } = require("cypress");

module.exports = defineConfig({
component: {
devServer: {
framework: "node"
},
},
e2e: {
baseUrl: "http://localhost:3030"}})
34 changes: 34 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
"mongodb": "^3.4.1",
"mongoose": "^5.8.11",
"morgan": "~1.9.1",
"node": "^19.6.0",
"nodemon": "^2.0.15"
},
"devDependencies": {
Expand Down