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 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 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, or 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 our Markdown files in this repository.
- Open a new browser tab, and work on the steps in your second 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 to remove all steps other than the "checkout" step.
- Add the following step to 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 Start commit, and choose to make a new branch named
ci
. - Click Propose a new file.
- Click Create pull request.
- Wait about 20 seconds 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