ipfs / infra

Tools and systems for the IPFS community
MIT License
133 stars 41 forks source link

Support for cypress on website jenkins-libs #455

Closed PedroMiguelSS closed 5 years ago

PedroMiguelSS commented 6 years ago

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

PedroMiguelSS commented 6 years ago

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

daviddias commented 5 years ago

Ping @ipfs/infra

scout commented 5 years ago

Please see https://github.com/ipfs/infra/issues/474#issuecomment-458686511 for my thoughts re: website deployments via Jenkins

scout commented 5 years ago

Jenkins has been shut down