GithubHelp home page GithubHelp logo

ramesanpp / github-actions-for-ci Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 180 KB

Home Page: https://lab.github.com/githubtraining/github-actions:-continuous-integration

License: MIT License

JavaScript 81.48% HTML 13.60% CSS 4.92%

github-actions-for-ci's Introduction

  • πŸ‘‹ Hello World, I’m Ajay Dev aka @RamesanPP
  • Experimenting.. Existing!. πŸ“
  • Titles don't mean anything to me. That's why I don't display any. πŸ‘Ύ
  • πŸ€– Currently excited by the AI buzz πŸ˜‰
  • BACKEND πŸ‘¨πŸΎβ€πŸ’»

github-actions-for-ci's People

Contributors

dependabot[bot] avatar github-learning-lab[bot] avatar hectorsector avatar lmkeston avatar mattdavis0351 avatar ramesanpp avatar

Stargazers

 avatar

Watchers

 avatar

github-actions-for-ci's Issues

Congratulations!

Congratulations!

Nice work, you did it! Your workflows now contain:

  • βœ… test against multiple targets so that we know if our supported operating systems and Node.js versions are working
  • βœ… dedicated test job so that we can separate out build from test details
  • βœ… access to build artifacts so that we can deploy them to a target environment
  • βœ… branch protections so that the main branch can't be deleted or inadvertently broken
  • βœ… required reviews so that any pull requests are double checked by teammates
  • βœ… obvious approvals so we can merge quickly and potentially automate merges and deployments

What's next?

There's so much more you can do with continuous integration, and you have a solid start. Now...what will you learn next?

There's a bug!

Welcome

In this repository, we'll be diving into the world of Continuous Integration. Continuous Integration, or CI, can benefit your projects and change how you work on GitHub. If you're new to Continuous Integration, you may be thinking, "What exactly is it, and do I need it in my project?"

What is CI? Why should you care?

a gear and a loop, representing continuous integration

CI can help you stick to your team’s quality standards by running tests and reporting the results on GitHub. CI tools run builds and tests, triggered by commits. The results post back to GitHub in the pull request. This reduces context switching for developers, and improves consistency for testing. The goal is fewer bugs in production and faster feedback while developing.

Choices around CI that will work best for your project depend on many factors, including:

  • Programming language and application architecture
  • Operating system and browsers you plan to support
  • Your team’s experience and skills
  • Scaling capabilities and plans for growth
  • Geographic distribution of dependent systems and the people who use them
  • Packaging and delivery goals

Using CI and Learning Lab

In other courses, you may have noticed that some actions take me longer to respond to than others. In this course, many of the actions will be related to builds. Those builds sometimes take longer to build, up to several minutes. Don't be concerned if I take a few minutes to respond, or if I respond too quickly. Sometimes, I'll let you know what the build will say before it finishes! Please wait for the builds to finish before moving on to your next step.

If you aren't already familiar, it may be a good idea to go through the Introduction to GitHub Learning Lab.

Step 1: Use a templated workflow

icon of a bug in a browser window

There's a bug somewhere in this repository. We'll use the practice of Continuous Integration (CI) to set up some automated testing to make it easier to discover, diagnose, and minimize scenarios like this.

Let's first introduce CI to this repository. The codebase is written with Node.js. GitHub Actions allows us to use some templated workflows for common languages and frameworks, like Node.js! Let's add it:

⌨️ Activity: Create a pull request with a templated workflow

  1. Go to the Actions tab.
  2. Choose the template Node.js workflow.
  3. Commit the workflow to a new branch.
  4. Create a pull request titled CI for Node.

I'll respond in the new pull request when I detect it has been created.


If at any point you're expecting a response and don't see one, refresh the page.

A workflow for the entire team

Custom workflow

Now that we've learned how to quickly set up CI, let's try a more realistic use case.

Our fictional team has a custom workflow that goes beyond the template we've used so far. We would like the following features:

an icon of three gears

Test against multiple targets so that we know if our supported operating systems and Node.js versions are working

icon of gears indicating relationship between multiple jobs

Dedicated test job so that we can separate out build from test details

icon of a binary file

Access to build artifacts so that we can deploy them to a target environment

icon of a security shield indicating branch protections

Branch protections so that the main branch can't be deleted or inadvertently broken

icon of a review approval

Required reviews so that any pull requests are double checked by teammates

icon of a review approval

Obvious approvals so we can merge quickly and potentially automate merges and deployments

Step 7: Create a custom GitHub Actions workflow

Can GitHub Actions support this workflow? Let's find out. We'll tackle some of the changes to the existing workflow file first.

⌨️ Activity: Edit the existing workflow with new build targets

  1. Edit your existing workflow file in a new branch
  2. In that file, target versions 12.x and 14.x of Node, only
  3. Open a new pull request titled Improve CI for your change.

I'll respond when you open the pull request.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.