Requirements
Before using GitHub Action Reusable Workflows, ensure your project and environment meet the following requirements:
Repository Requirementsโ
- GitHub Repository: Your project must be hosted on GitHub
- GitHub Actions Enabled: GitHub Actions must be enabled for your repository
- Workflow Permissions: Appropriate permissions to create and modify workflow files
Project Requirementsโ
For Python Projectsโ
- Python Version: Python 3.8 or higher (workflows support 3.8-3.12)
- Package Structure:
- Standard Python package with
setup.pyorpyproject.toml - Poetry-managed projects with
pyproject.tomlandpoetry.lock
- Standard Python package with
- Test Framework: PyTest (recommended and supported by default)
- Version File:
__pkg_info__.pymodule with__version__variable (for deployment workflows)
For Docker Projectsโ
- Dockerfile: A valid Dockerfile in your repository
- Docker Registry Access: Credentials for DockerHub or GitHub Container Registry (GHCR)
For Documentation Projectsโ
- Documentation Framework: Docusaurus, MkDocs, or similar
- Build Configuration: Proper build scripts defined in
package.jsonor documentation config
Optional Requirementsโ
For Code Coverageโ
- Coverage Tools:
pytest-covorcoverage.py - Platform Tokens:
- Codecov token (for Codecov integration)
- Coveralls token (for Coveralls integration)
- Codacy project token (for Codacy integration)
For Code Qualityโ
- SonarQube/SonarCloud: Account and project token for code quality scanning
- Configuration File:
sonar-project.propertiesin repository root
For Release Managementโ
- GitHub Token: Automatically provided by GitHub Actions
- PyPI Credentials: Username and token for publishing to PyPI (official or test)
- Semantic Versioning: Follow semantic versioning for releases
GitHub Secrets Configurationโ
You'll need to configure the following secrets in your repository settings:
Required for PyPI Deploymentโ
PYPI_USERNAMEorPYPI_TOKEN- PyPI credentialsTEST_PYPI_TOKEN- Test PyPI token (for testing releases)
Required for Code Coverageโ
CODECOV_TOKEN- Codecov API tokenCOVERALLS_TOKEN- Coveralls API tokenCODACY_PROJECT_TOKEN- Codacy project token
Required for Dockerโ
DOCKERHUB_USERNAME- DockerHub usernameDOCKERHUB_TOKEN- DockerHub access token
Required for SonarQubeโ
SONAR_TOKEN- SonarQube/SonarCloud token