Cypress | Bitbucket Pipeline Configuration | --clone
This project is based on Cypress & docker containers where you can choose different configurations. Also, the master branch is the one that will run the Bitbucket Pipeline.
I recommend you to take a look at this other project if you want to know how to do it with Github Actions
You will have to make sure that you follow the next steps, if you want to get this project done on your own:
- Create a directory in your local machine
- Create a Bitbucket Repository
- Clone the repository inside of your Repo
- CD inside of your directory
- Create a Node.js project
- Install cypress
- Run cypress
- Go back to Bitbucket > Open your repo > Go to Pipelines > Setting up your project with Node.js
- Add your node.js commands to run the pipeline
- Commit the new file & check the pipeline to see if this set-up is working for you
- Go back to your project and open your project in visual studio and pull the new changes
mkdir [project_name]
cd [project_name]
npm init -y
npm install cypress --save-dev
npx cypress open or ./node_modules/.bin/cypress open
control + c [stop_running_cypress]
# Template NodeJS build
# This template allows you to validate your NodeJS code.
# The workflow allows running tests and code linting on the default branch.
image: node:10.15.3
options:
max-time: 15
pipelines:
default:
- step:
name: Pipeline Cypress E2E
caches:
- npm
- cypress
image: cypress/base:10
script:
- npm ci
- npx cypress run
artifacts:
- cypress/reports/**
- cypress/videos/**
definitions:
caches:
npm: $HOME/.npm
cypress: $HOME/.cache/Cypress
You will have to do the following steps:
git clone --mirror [Bitbucket_Repo_URL]
# Make a bare mirrored clone of the repository
cd repository-to-mirror.git
git remote set-url --push origin [Github_Repo_URL]
# Set the push location to your mirror
git push --mirror