github-actions-checks
v1.3.1
Published
A CLI-tool for generate github-actions workflow for pull-requests and master branch checks
Downloads
14
Maintainers
Readme
📝 Table of Contents
🧐 About
We have created a project to configure the same type of checks. This package allows you to quickly configure the necessary checks for your repository using github-actions. This is a CLI tool with very simple usage.
🏁 Getting Started
Just run
npx github-actions-checks
The file .github.checks.json
will appear in your repository. You can edit it as you like and re-run the utility to update workflow according to the config.So, just edit this file and run again:
npx github-actions-checks
Then commit changes in your repository.
🎈 Usage
The main config - .github.checks.json
config by default:
{
"env": {
"NODE_ENV": "CI"
},
"jobs": [
{
"key": "checks",
"steps": [
{
"key": "eslint",
"name": "ESLint",
"command": "npm run eslint"
},
{
"key": "prettier",
"name": "Prettier",
"command": "npm run prettify"
}
]
},
{
"key": "tests",
"steps": [
{
"key": "unit",
"name": "Unit",
"command": "npm run test"
}
]
}
],
"showComments": false,
"node": 16,
"installCommand": "npm install",
"buildCommand": ""
}
showComments
- show Comments section
env
- environment variables
jobs
- asynchronous processes
each process will start a virtual machine with:
node
- node.js version
installCommand
- command to install dependencies
buildCommand
- the command to build the project
useTurbo
- use Turborepo cache
steps
- array of checks within a separate process
each step has:
key
name
- Title
command
- bash command
preCommand
- prepare bash command
artifacts
- array of folders with artifacts
in this example, 2 parallel processes will start:
- in the first, checks will run one after the other: eslint and prettier,
- in the second - unit tests
💬 Comments
Works only in private repositories!
If you change {showComments: true}
in .github.checks.json
, a special comment with the status of checks will be displayed in the pull request.
Example of a comment when checks are in progress:
Example of a comment when one of the checks failed:
Example of a comment when one of the checks failed:
✍️ Authors
- @aleksnick - Idea & Initial work, contact in telegram