eye942 / github-actions-for-ci Goto Github PK
View Code? Open in Web Editor NEWHome Page: https://lab.github.com/githubtraining/github-actions:-continuous-integration
License: MIT License
Home Page: https://lab.github.com/githubtraining/github-actions:-continuous-integration
License: MIT License
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:
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 master
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
Can GitHub Actions support this workflow? Let's find out. We'll tackle some of the changes to the existing workflow file first.
12.x
and 14.x
of Node, onlyI'll respond when you open the pull request.
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?"
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:
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.
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:
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.
Nice work, you did it! Your workflows now contain:
master
branch can't be deleted or inadvertently brokenThere's so much more you can do with continuous integration, and you have a solid start. Now...what will you learn next?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.