Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add CI workflows for testing, linting and publishing to PyPI by tag #63

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

tharropoulos
Copy link
Contributor

@tharropoulos tharropoulos commented Nov 15, 2024

Change Summary

What is this?

This pull request introduces a new GitHub Actions workflow for publishing the Python package to PyPI when a new release tag is pushed. This new workflow aims to streamline the release process and ensure that the package is built and published correctly.

Changes

Added Features:

  1. New Workflow in .github/workflows/release.yml:
  • The release.yml workflow is triggered when a new Git tag starting with v is pushed to the repository.
  • It consists of two jobs:
    • tests: Runs the test suite (excluding OpenAI tests) and reports the test coverage.
    • build-n-publish: Builds the Python package and publishes it to PyPI using the pypa/gh-action-pypi-publish action.
  • The workflow checks out the repository, sets up the Python environment, installs the necessary dependencies, and runs the required commands to build and publish the package.
  • The attestations option is enabled for the PyPI publish step to ensure build provenance.
  • Added a new GitHub Actions workflow file to handle the release process.
  • The workflow consists of two jobs: tests and build-n-publish.
  • The tests job runs the test suite and reports the coverage.
  • The build-n-publish job builds the package and publishes it to PyPI.
  1. New Workflow in .github/workflows/test-and-lint.yml:
  • The test-and-lint.yml workflow is triggered on both push and pull request events to the master branch.
  • It runs a quality job that tests the codebase against multiple Python versions (3.8, 3.9, 3.10, 3.11, 3.12).
  • The job sets up a Typesense service as a dependency, waits for it to be ready, and then runs the following tasks:
    • Installs the project's development dependencies.
    • Lints the code using Flake8.
    • Checks the type annotations using mypy.
    • Runs the test suite (excluding OpenAI tests) and reports the coverage.

PR Checklist

@tharropoulos tharropoulos changed the title Add basic testing and linting CI workflow Add CI workflows for testing, linting and publishing to PyPI by tag Nov 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant