A bundle for Batect that provides an opinionated, sensible default environment for bundle development.
Add the following to your batect.yml
:
include:
- type: git
repo: https://github.com/batect/bundle-dev-bundle.git
ref: XXX # Replace with latest version from https://github.com/batect/bundle-dev-bundle/releases
Uses editorconfig-checker to check that all files comply with the configuration in .editorconfig
.
Uses YAPF to check the formatting of all Python code in the project.
The code style is based on the PEP 8 guidelines, with some minor customisation.
Uses shfmt to check the formatting of all shell scripts in the project.
You may need to add the following to your .editorconfig
file so that shfmt
does not check the formatting of the batect
script:
[batect]
ignore = true
Uses yamllint to check the formatting of all YAML files in the project.
The configuration is based on yamllint's default configuration, with some minor customisation.
See lint:docker
from the Hadolint bundle.
See lint:shell
from the ShellCheck bundle.
Runs test/tests.py
(in the project, not from this bundle) in a container that has a running Docker daemon.
The Golang bundle, Node.js bundle, Java bundle and hello world bundle all have example sets of tests that use this configuration.
The following example adds two convenience tasks, check-format
and lint
, that run all related tasks.
include:
- type: git
repo: https://github.com/batect/bundle-dev-bundle.git
ref: XXX # Replace with latest version from https://github.com/batect/bundle-dev-bundle/releases
tasks:
check-format:
description: Run all formatting check tasks.
group: Formatting check tasks
prerequisites:
- check-format:editorconfig-compliance
- check-format:python
- check-format:shell
- check-format:yaml
lint:
description: Run all linting tasks.
group: Linting tasks
prerequisites:
- lint:docker
- lint:shell
This repository also has a sample GitHub Actions workflow that uses these tasks to check the bundle on every push.
The Golang bundle, Node.js bundle, Java bundle and hello world bundle all use this bundle as part of their development workflow.
Run ./batect --list-tasks
to see a list of available tasks for this project.