Skip to content

add travis configuration#2

Merged
aJeide merged 2 commits into
mainfrom
initial-travis-config
Mar 12, 2021
Merged

add travis configuration#2
aJeide merged 2 commits into
mainfrom
initial-travis-config

Conversation

@aJeide

@aJeide aJeide commented Mar 12, 2021

Copy link
Copy Markdown
Owner

No description provided.

@github-learning-lab

Copy link
Copy Markdown
Contributor

Nice work getting this pull request opened!

This pull request adds a .travis.yml configuration file. This file is necessary to return a successful build. This configuration file is where we define how we want to build and test the code.

All projects have different needs, ranging from standard unit tests to custom configuration. Regardless of the definition of "success" for your project, this is the place to define it.

There isn't much in this file right now, but we're going to change that. We'll make a change to configure the build environment.

You might be noticing a few things about this configuration file, like the programming language.

You can trigger Travis CI builds with new commits. To trigger Travis CI, add the below text in place of the replace me with rvm placeholder:

2.5

Step 2: Specify the Ruby version

To get the CI build to succeed, replace the placeholder text and commit the change.

⌨️ Activity: Define a specific version of a language

  1. In this pull request, replace the placeholder text with 2.5. You can do this by editing the file from the Files changed tab, or by scrolling down and accepting the suggested change.

I'll respond below with your next step.

Sometimes I respond too fast for the page to update! If you perform an expected action and don't see a response, wait a few seconds and refresh the page for your next steps.

Comment thread .travis.yml Outdated
Co-authored-by: github-learning-lab[bot] <37936606+github-learning-lab[bot]@users.noreply.github.com>

@github-learning-lab github-learning-lab Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work getting your CI build to succeed! 🎉

Notice that your pull request shows all checks have passed with 2 successful checks.

screen shot 2019-01-03 at 12 24 52 pm

You'll notice that there are two build status checks. One build is for the branch and the other build is for the pull request (more accurately, the merge of your initial-travis-config branch into the base branch main).

Why did my CI build succeed?

The .travis.yml file defines your build environment and which automated tests to run. The entire delivery process is defined through this single .travis.yml file. If this file is present and your commit passes the tests as outlined in the .travis.yml file, your CI build will succeed.

Step 3: Merge the configuration

Now that our CI build is succeeding, merge this pull request so the .travis.yml file is pushed to main.

⌨️ Activity: Share your configuration with the team by merging it

  1. Click merge pull request, and delete your branch

I'll respond below with your next step.

@aJeide aJeide merged commit 7238471 into main Mar 12, 2021
@github-learning-lab

Copy link
Copy Markdown
Contributor

The .travis.yml file treats configuration and build environments as code. Version control is an important part of secure collaboration for code. Configuration as code adds the benefits of Git version control for test and build environments.

Now that your CI build is succeeding, let's add some validations to your project.


I've opened a new pull request for your next steps.

Sometimes I respond too fast for the page to update! If you perform an expected action and don't see a response, wait a few seconds and refresh the page for your next steps.

@aJeide aJeide deleted the initial-travis-config branch March 12, 2021 19:34
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.

2 participants