ipfs / infra

Tools and systems for the IPFS community

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support for cypress on website jenkins-libs

PedroMiguelSS opened this issue · comments

Hi there!

On js.ipfs.io we are using the website library function for Jenkins CI, as you can see in ipfs/js.ipfs.io/ci/Jenkinsfile.

In the context of ipfs/js.ipfs.io#199, we added tests to the service-worker-gateway usage, in order to avoid similar problems. We are using cypress to achieve that.

Our goal is to run the tests on the CI. Accordingly, after the build step we should spawn a server, which using the /public folder would run the tests. In our point of view, it should run on a different stage (a post-build one) instead of running on the build stage.

Here is what we are trying to run:

start-server-and-test serve http://localhost:9000 cy:run

After taking a look at website library function we think that having an option like:

website([
   (...)
   cypress: 'start-server-and-test serve http://localhost:9000 cy:run'
])

would be one possible solution to keep it simple.

You can check here what's needed to run cypress on CI.

NOTE: For now, we have the tests running on the pre-push hook. But it's only a temporary solution until we get it running on the CI.

//cc @vasco-santos

ipfs/js.ipfs.io#199 will be blocked until we get a solution for this.

Ping @ipfs/infra

commented

Please see #474 (comment) for my thoughts re: website deployments via Jenkins

commented

Jenkins has been shut down