Create workflows that enable you to use Continuous Integration (CI) for your projects.
Welcome to "GitHub Actions: Continuous Integration"! 👋
What is continuous integration?: Continuous integration 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 quality results post back to GitHub in the pull request. The goal is fewer issues in main
and faster feedback as you work.
- Workflow: A workflow is a unit of automation from its start to finish, including the definition of what triggers the automation, what environment or other aspects should be taken into account during the automation, and what should happen as a result of the trigger.
- Job: A job is a section of the workflow, and is made up of one or more steps. In this section of our workflow, the template defines the steps that make up the
build
job. - Step: A step represents one effect of the automation. A step could be defined as a GitHub Action, or another unit, like printing something to the console.
- Action: An action is a piece of automation written in a way that is compatible with workflows. Actions can be written by GitHub, by the open source community, and you can write them yourself!
To learn more, check out Workflow syntax for GitHub Actions in the GitHub Docs.
First, let's add a workflow to lint (clean, like a lint roller) our Markdown files in this repository.
- Open a new browser tab, and work through the following steps in that tab while you read the instructions in this tab.
- Go to the Actions tab.
- Click New workflow.
- Search for "Simple workflow" and click Configure.
- Name your workflow
ci.yml
. - Update the workflow by deleting the last two steps.
- Add the following step at the end of your workflow:
- name: Run markdown lint run: | npm install remark-cli remark-preset-lint-consistent npx remark . --use remark-preset-lint-consistent --frail
Even after the code is indented properly in
ci.yml
, you will see a build error in GitHub Actions. We'll fix this in the next step. - Click Commit changes..., and choose to make a new branch named
ci
. - Click Propose changes.
- Click Create pull request.
- Wait about 20 seconds and then refresh this page (the one you're following instructions from). GitHub Actions will automatically update to the next step.
Get help: Post in our discussion board • Review the GitHub status page
© 2023 GitHub • Code of Conduct • MIT License