Skip to content

Latest commit

 

History

History
65 lines (45 loc) · 2.95 KB

CONTRIBUTING.md

File metadata and controls

65 lines (45 loc) · 2.95 KB

Contribute

Overview

This document explains the processes and practices recommended for contributing enhancements to the GitHub Runner operator.

  • Generally, before developing enhancements to this charm, you should consider opening an issue explaining your use case.
  • If you would like to chat with us about your use-cases or proposed implementation, you can reach us at Canonical Charm Development Matrix public channel or Discourse.
  • Familiarizing yourself with the Charmed Operator Framework library will help you a lot when working on new features or bug fixes.
  • All enhancements require review before being merged. Code review typically examines
    • code quality
    • test coverage
    • user experience for Juju administrators of this charm. For more details, check our contributing guide.

Developing

For any problems with this charm, please report bugs here.

The code for this charm can be downloaded as follows:

git clone https://github.com/canonical/github-runner-operator.git

Prior to working on the charm ensure juju is connected to an LXD cloud, see the upstream documentation for details.

Testing

This project uses tox for managing test environments. There are two tox working directories, one in the root directory and one in the directory github-runner-manager for the Python library. For each tox working directory, there are some pre-configured environments that can be used for linting and formatting code when you're preparing contributions to the charm:

  • tox: Runs all of the basic checks (lint, unit, static, and coverage-report).
  • tox -e fmt: Runs formatting using black and isort.
  • tox -e lint: Runs a range of static code analysis to check the code.
  • tox -e static: Runs other checks such as bandit for security issues.
  • tox -e unit: Runs the unit tests.
  • tox -e integration: Runs the integration tests.

NOTE: Integration tests are currently intended to run on the CI and may not work locally without further argument.

Generating src docs for every commit

Run the following command:

echo -e "set -eu" >> .git/hooks/pre-commit
echo -e "tox -e src-docs" >> .git/hooks/pre-commit
echo -e "git add src-docs\ngit add github-runner-manager/src-docs" >> .git/hooks/pre-commit
chmod +x .git/hooks/pre-commit

Building the charm

Build the charm in this git repository using:

charmcraft pack

Canonical Contributor Agreement

Canonical welcomes contributions to the GitHub Runner Operator. Please check out our contributor agreement if you’re interested in contributing to the solution.