This PR adds CD via GitHub Actions and slightly refactors the old tests into a new GitHub Action ci.yml.
.github/workflows/ci.yml replaces the old .github/workflows/run_tests.yml. We now will run the tests on a push to main in addition to running tests on pull requests. The tests are now being invoked through our build system hatch. This allows us to consolidate testing dependencies into one location, hatch.toml. Tests can be invoked locally with hatch run test:test, this will run tests locally for our supported python versions.
CD has been added in .github/workflows/cd.yml. This action will be ran after tests pass on push to main. The action uses hatch to build the packages. python-semantic-version is being used to automatically do the versioning, create a changelog, create release notes and create a release in GitHub Releases.
python-semantic-version automatically determines the next version number by parsing commit messages. The default configuration is shown below, however we can customize if desired:
An example would be git commit -m "fix: resolve some error." This would be cause a semantic version patch increase e.g. 0.1.0 -> 0.1.1. Commits that do not start with "fix:", "feat:" or "perf:" do not cause a version increase. Using the other tags, for example, "build:" will be add the commit message to the changelog and release notes.
This PR adds CD via GitHub Actions and slightly refactors the old tests into a new GitHub Action
ci.yml
..github/workflows/ci.yml
replaces the old.github/workflows/run_tests.yml
. We now will run the tests on a push tomain
in addition to running tests on pull requests. The tests are now being invoked through our build systemhatch
. This allows us to consolidate testing dependencies into one location,hatch.toml
. Tests can be invoked locally withhatch run test:test
, this will run tests locally for our supported python versions.CD has been added in
.github/workflows/cd.yml
. This action will be ran after tests pass on push tomain
. The action useshatch
to build the packages.python-semantic-version
is being used to automatically do the versioning, create a changelog, create release notes and create a release in GitHub Releases.python-semantic-version automatically determines the next version number by parsing commit messages. The default configuration is shown below, however we can customize if desired:
An example would be git commit -m "fix: resolve some error." This would be cause a semantic version patch increase e.g. 0.1.0 -> 0.1.1. Commits that do not start with "fix:", "feat:" or "perf:" do not cause a version increase. Using the other tags, for example, "build:" will be add the commit message to the changelog and release notes.
The general CD flow is:
Finally, the readme was updated to have badges for passing and failing CI/CD.