CodeClimate
When creating a repository from this template an init workflow (see here) will run. This workflow uses kaskadi-cli in order to properly initialize your repository by:
- updating the names refering to the template in relevant files (for example
package.json,package-lock.json, etc.) and renaming some files if need be - automatically adding your repository to Code Climate
- automatically setting
REPORTER_IDsecret inside of your repository for test coverage upload to Code Climate. This may fail because of Code Climate infrastructure latency in setting up your repository. In such case your workflow will emit a warning telling you to setREPORTER_IDmanually
mocha, chai, nyc & standard are available as dev dependencies.
A build workflow (see here) is running on pull request and will execute your test suite before allowing you to merge your PR. It also has a coverage job already prepared that you can comment out as soon as your testing is in place and your REPORTER_ID is in the repository secrets. This is the ID on Code Climate used for uploading code coverage reports.
Beside running your unit tests, this workflow also runs a static code analysis to find any vulnerability in your code. If a vulnerability is found, a notification will appear in the Security tab of your repository.
Note: a analyze-code workflow (see here) is also in charge of performing a static code analysis on push. This ensure that vulnerabilities are catched even when pushing hotfixes.
This repository comes with a generate-docs workflow that generates documentation automatically for you based on your action.yml. See here and there for more information.
If you would like to see the workflow configuration, head here.
You can configure the template used to generate the action documentation here
template repository to create GitHub Actions
You can use the following code as a new GitHub Actions Workflow:
name: {YOUR-ACTION-NAME}
on: [{YOUR-ACTION-EVENT}]
jobs:
{YOUR-JOB-NAME}:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: {YOUR-STEP-NAME}
uses: kaskadi/template-action@master
with:
input_1: {INPUT_1-VALUE}
env:
env_1: {ENV_1-VALUE}Note: everything contained in single curly brackets ({ }) needs to be replaced by your desired values
Inputs:
| Input | Required | Default | Description |
|---|---|---|---|
input_1 |
false |
default |
This is an input |
Outputs:
| Output | Description |
|---|---|
output_1 |
This is an output |
Environment variables:
| Variable | Required | Description |
|---|---|---|
env_1 |
true |
This is an environment variable |