Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setting Up CI #1

Merged
merged 5 commits into from
Jan 29, 2021
Merged

Setting Up CI #1

merged 5 commits into from
Jan 29, 2021

Conversation

github-learning-lab[bot]
Copy link
Contributor

Welcome

Welcome to the Learning Lab course "Using GitHub Actions for CD". What is CD? If you don't already know, you'll find out soon!

Before you get started, it's important that you are comfortable with a few skills. We recommend going through the Introduction to GitHub Learning Lab course and the Hello, GitHub Actions! Learning Lab course before beginning this one.

Other experience with workflow automation will help, but are not necessary to complete this course.

Set up CI Workflow

What is CI?

First, take a moment to examine the image below. It shows the relationship between continuous integration, continuous delivery and continuous deployment.

Continuous integration (CI) is a practice where developers integrate code into a shared branch several times per day. The shared branch is sometimes referred to as trunk, but on Git, it's named main. To integrate code, developers commit on other Git branches, push their changes, and merge to main through pull requests.

Automated events take place throughout this process. These events can range from running tests or deployments to cross-linking to relevant threads. Here's an example that we will use:

  • Source code goes through an automated build process if necessary
  • Automated testing of the software takes place
  • Reports are generated and sent back to the developers with the status of their changes

GOAL: Regular code integration enables faster and easier error detection.

Why do we need this?

Continuous delivery (CD) is the natural "next phase" of continuous integration (CI). Setting up a CI workflow will show us the entire picture of our workflow.

But, this is NOT a course on CI. We will not being going into detail on what CI means, or how to use CI with GitHub Actions.

Wait! There's good news 👍! If you need a CI refresher you can take the Using GitHub Actions for CI Learning Lab course to get up to speed.

@github-learning-lab
Copy link
Contributor Author

Moving the workflow file to .github/workflows/ci-workflow.yml

There is a file on this branch called ci-workflow.yml. But, now I need your help!

Step 1: Move the workflow file

As a bot 🤖, I can only do so many things. Setting up a workflow for you isn't something I can do. Don't worry, I'll be here to help you, just follow these steps and we should be good to go. 👍

Please move the ci-workflow.yml file into a new folder and update the contents of the file.

At first, it will look like this:
screenshot of file title as `.github/ci-workflow.yml

When you're done renaming, you will have created a new directory and moved the file into that new directory. Your file title should look like this:

screenshot of file title as `.github/workflows/ci-workflow.yml

⌨️ Move the ci-workflow.yml file

  1. Edit the file location by changing its name from ci-workflow.yml to workflows/ci-workflow.yml.
  2. Commit the file to the ci-workflow branch once you have changed the path:
    screenshot highlighting the commit changes button

@github-learning-lab github-learning-lab bot merged commit 4b6f05e into main Jan 29, 2021
@github-learning-lab github-learning-lab bot deleted the ci-workflow branch January 29, 2021 14:51
@github-learning-lab
Copy link
Contributor Author

Great Job 👍

I have merged this pull request for you, and opened a new one for you to start working on the CD segment of our workflow.

Navigate to the next pull request to continue this course.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant