DEV Community

Cover image for OSD600 - Lab 09
Gustavo Tavares
Gustavo Tavares

Posted on

OSD600 - Lab 09

Hey,

Lab 09 is here, this time its time to add continuous integration to our SSG using (Github Actions)[https://docs.github.com/en/actions]!


What Continuous Integration Do For Us?

The continuous integration allow us to keep coding, committing and pushing and for each of these actions a series of tests will be automatically run to make sure we are not breaking anything.

This way we can be sure that no matter how many people are working on a project, it will be always working acordingly.


The Yml File

To be honest this was the first time I worked with a Yml file.
It was pretty simple to be honest, it was automatically created and it contained the information for the tests to run.

It looked something like this:

name: learn-github-actions
on: [push]
jobs:
  check-bats-version:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: actions/setup-node@v2
        with:
          node-version: '14'
      - run: npm install -g bats
      - run: bats -v
Enter fullscreen mode Exit fullscreen mode

My Partner Testing

My partner was Dhillonks.
His SSG worked really well, he did a really good job on making it a Script so I dont need to type node to make it work.

His tests were concise and precise. I added test to his convertFileToHtml().
My tests made sure that the output was Defined, not Null, True and if called without parameters it also should throw an error.

You can see the PR here.

Thank you for Reading!

Discussion (0)