Skip to content

feat(ci): add GitHub Actions for linting, testing, and release#6

Merged
sodle-splunk merged 7 commits intoalphafrom
sodle/PAPP-35703
Apr 11, 2025
Merged

feat(ci): add GitHub Actions for linting, testing, and release#6
sodle-splunk merged 7 commits intoalphafrom
sodle/PAPP-35703

Conversation

@sodle-splunk
Copy link
Collaborator

@sodle-splunk sodle-splunk commented Apr 4, 2025

  • Update the uv configuration to use PyPI instead of the Splunk private index, and regenerate the uv lock accordingly.
  • Update requires-python to support Python 3.13.
  • Add the __version__ field to the root of the package, sourced from the importlib metadata.
  • Update the mypy config to ignore the tests and app templates, and ignore the missing phantom and phantom_common imports.
  • Add a GitHub Actions workflow to run ruff, ruff-format, pytest, and mypy on both supported Python versions for every pull requests.
  • Add a workflow that runs semantic-release after merging to main, resulting in a GitHub release and tag.
    • Please note, the update_version.py script for this step was generated by GitHub Copilot, with a few tweaks by me to make mypy happy about it. This script is likely to be replaced soon, once uv receives support for bumping the package version via a CLI command.
  • Add a workflow that runs when creating a new tag from main, which builds the package and uploads its source_dist and wheel to the corresponding GitHub release.
  • Add a similar workflow which creates pre-releases from the alpha branch. alpha is now the default branch.
  • Enable commitlint checks on pull request

@sodle-splunk sodle-splunk changed the title GitHub Actions for linting, testing, release feat(ci): add GitHub Actions for linting, testing, and release Apr 7, 2025
@github-actions
Copy link

github-actions bot commented Apr 9, 2025

Merging this PR will release 1.0.0 with the following release notes:

# 1.0.0 (2025-04-09)


### Bug Fixes

* **ci:** add token back for dry run ([b197a5c](https://github.com/phantomcyber/soar-apps-sdk/commit/b197a5cc92f43de05ac940522be874120e46b7b4))
* **ci:** do fetch before release ([bf6a691](https://github.com/phantomcyber/soar-apps-sdk/commit/bf6a6912cf3c5b8f85722b1a8283e22e9891e2ff))
* **ci:** do semantic release dryrun without ci context ([d2e0197](https://github.com/phantomcyber/soar-apps-sdk/commit/d2e019716c672a8f95d0120e76332572e3431b53))
* **ci:** missing quote in comment body ([1c52e08](https://github.com/phantomcyber/soar-apps-sdk/commit/1c52e08c054c633edd3a0f4377a9e90203147603))
* **ci:** semantic release dependencies ([10e8dca](https://github.com/phantomcyber/soar-apps-sdk/commit/10e8dca91c823074a392beba7adf403419b6bc92))
* **ci:** typo in .releaserc ([40ac18e](https://github.com/phantomcyber/soar-apps-sdk/commit/40ac18e8988f63b940fac25cc56c52f0697a353a))
* **ci:** unset ci for dry run ([eef71a9](https://github.com/phantomcyber/soar-apps-sdk/commit/eef71a977ee29057a6badb5c5199402b734c8f03))
* **ci:** unset ci for dry run ([9706bfa](https://github.com/phantomcyber/soar-apps-sdk/commit/9706bfac448adaf6c887490af8ed45019a8130ee))


### Features

* **ci:** add GitHub Actions for linting, testing, and release ([7b36bd6](https://github.com/phantomcyber/soar-apps-sdk/commit/7b36bd6f464d3e42c87aa4f641fd298e96a20f22))
* **ci:** comment on the pr with preliminary release notes ([f6db464](https://github.com/phantomcyber/soar-apps-sdk/commit/f6db4643116d3e86d1db0e945721bdce4db871b3))
* **ci:** enable commitlint ([6aa3d60](https://github.com/phantomcyber/soar-apps-sdk/commit/6aa3d60326595984685bc75c9afefcf8442d7755))
* **ci:** run a dry-run of semantic release on pr ([f274150](https://github.com/phantomcyber/soar-apps-sdk/commit/f274150ab1a13c982e17272ceb254f54c798c413))
* **ci:** run semantic-release and build package when merging PR ([139dec8](https://github.com/phantomcyber/soar-apps-sdk/commit/139dec856021158d50008a8f426b42a429222726))

@github-actions
Copy link

github-actions bot commented Apr 9, 2025

Merging this PR will release 1.0.0 with the following release notes:

1.0.0 (2025-04-09)

Bug Fixes

  • ci: add token back for dry run (b197a5c)
  • ci: do fetch before release (bf6a691)
  • ci: do semantic release dryrun without ci context (d2e0197)
  • ci: format release notes (e65e706)
  • ci: missing quote in comment body (1c52e08)
  • ci: semantic release dependencies (10e8dca)
  • ci: typo in .releaserc (40ac18e)
  • ci: unset ci for dry run (eef71a9)
  • ci: unset ci for dry run (9706bfa)

Features

  • ci: add GitHub Actions for linting, testing, and release (7b36bd6)
  • ci: comment on the pr with preliminary release notes (f6db464)
  • ci: enable commitlint (6aa3d60)
  • ci: run a dry-run of semantic release on pr (f274150)
  • ci: run semantic-release and build package when merging PR (139dec8)

install uv before tests

unfreeze uv sync

use pypi source for packaging

mypy target

Apply suggestions from code review

Co-authored-by: phantom-jacob <43217172+phantom-jacob@users.noreply.github.com>

comment out mypy/pytst and add ruff-format

fix mypy config

re-enable mypy in pipeline

clarify mypy settings

rename quality workflow, add version string to package, update max python version
fix(ci): use HEAD for last commit instead of branch name

fix(ci): fetch all history for commitlint

fix(ci): fetch deeper history for commitlint

fix(ci): fetch all history for commitlint

fix(ci): add commitlint.config.js

fix(ci): fetch-depth=0 instead of fetch-all

fix(ci): typo in .releaserc
fix(ci): semantic release dependencies

fix(ci): do semantic release dryrun without ci context

fix(ci): do fetch before release

fix(ci): unset ci for dry run

fix(ci): unset ci for dry run

fix(ci): add token back for dry run
fix(ci): missing quote in comment body

fix(ci): format release notes
@github-actions
Copy link

Merging this PR will release 1.0.0 with the following release notes:

1.0.0 (2025-04-11)

Bug Fixes

  • shims: limit what is exported from shim modules (a44e50e)
  • shims: limit what is exported from shims.phantom.app (42af2ec)

Features

  • ci: add GitHub Actions for linting, testing, and release (69bddc4)
  • ci: comment on the pr with preliminary release notes (9c59afa)
  • ci: enable commitlint (2277819)
  • ci: enable pytest (10cda5b)
  • ci: run a dry-run of semantic release on pr (d72a21e)
  • ci: run semantic-release and build package when merging PR (9c0be3f)

@sodle-splunk sodle-splunk changed the base branch from main to alpha April 11, 2025 13:44
@github-actions
Copy link

Merging this PR will release 1.0.0-alpha.1 with the following release notes:

1.0.0-alpha.1 (2025-04-11)

Bug Fixes

  • shims: limit what is exported from shim modules (a44e50e)
  • shims: limit what is exported from shims.phantom.app (42af2ec)

Features

  • ci: add GitHub Actions for linting, testing, and release (69bddc4)
  • ci: comment on the pr with preliminary release notes (9c59afa)
  • ci: enable commitlint (2277819)
  • ci: enable pytest (10cda5b)
  • ci: run a dry-run of semantic release on pr (d72a21e)
  • ci: run semantic-release and build package when merging PR (9c0be3f)
  • ci: use alpha as default branch and cut prereleases from it (b0cf8cf)

@phantom-jacob
Copy link
Collaborator

I may come back and refactor some of the CI to just run pre-commit, so that local and remote linting and formatting is kept in sync automatically. However, I'm not gonna let that block this PR because it's an important improvement to the status quo and generally increases our confidence in any and all changes moving forward

@sodle-splunk sodle-splunk added this pull request to the merge queue Apr 11, 2025
Merged via the queue into alpha with commit 7dec4dc Apr 11, 2025
10 checks passed
@github-actions
Copy link

🎉 This PR is included in version 1.0.0-alpha.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@soar-sdk-semantic-release
Copy link

🎉 This PR is included in version 1.0.0-beta.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants