Skip to content

batect/bundle-dev-bundle

main
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

bundle-dev-bundle

Build Status License

A bundle for Batect that provides an opinionated, sensible default environment for bundle development.

Usage

Setup

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

Tasks

check-format:editorconfig-compliance

Uses editorconfig-checker to check that all files comply with the configuration in .editorconfig.

check-format:python

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.

check-format:shell

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

check-format:yaml

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.

lint:docker

See lint:docker from the Hadolint bundle.

lint:shell

See lint:shell from the ShellCheck bundle.

test

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.

Example

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.

Development

Run ./batect --list-tasks to see a list of available tasks for this project.

About

A bundle for Batect that provides an opinionated, sensible default environment for bundle development.

Topics

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Contributors 4

  •  
  •  
  •  
  •