Advice for Writers Hoping to Get Into Big Publications

Someone commented on an article I wrote last week. They said teaching writing and knowing academic writing rules was worth nothing in the blogging world. And being both a writing teacher and blogger…

Smartphone

独家优惠奖金 100% 高达 1 BTC + 180 免费旋转




Running WebdriverIO test on Github Actions CI

This blog intends to share details around Gitlab actions & how to integrate them with WebDriver IO tests.

Now since we are ready with the repo. Let us now start configuring Github Actions.

Note: Since it is a .yml file. Please take extra care of the indentations

This is the name of the CI Job, You can modify it as per your liking.

Here we are actually defining a rule that on every push or pull start running this job on the master branch

We are instructing GitHub actions to spin up the latest ubuntu instance for us where we can execute our tests.

In steps, we are checking out our code and setting up the node instance.

Here we are installing all the dependencies that we had mentioned in our package.json file in the WDIO repo.

Here we are running the test on Browserstack but you can use any other tool like Docker, Saucelabs and etc as well to run your test.

Now click on Start commit > add a comment and > commit new file.

Your file is now committed to GitHub but it will fail as we have not added the Browserstack credentials.

As you can see we are using BrowserStack to run our test. Hence we will need to pass its credentials as well.

GitHub gives an option to store this in encrypted format as environment variables and once stored it will be available to use in GitHub Actions workflows.

Head to the repo setting > secret > Actions > New repo secret > Add name & Value.

Once saved it will look like this

Now the Access key and Username both are available as an environment variable to the job.

So now on every push and pull you can see a job will be triggered and you can see the logs as well under the Actions tab.

This is it we have successfully integrated GitHub Actions-CI with our WebDriverIO test.

Add a comment

Related posts:

Drafting Contracts of Any Kind

We are leading legal company which is committed to set up new business in Russia and U.A.E. With special knowledge on import/export of goods from Russia and U.A.E. Russian Enter specializes in…