Reusable Workflows Overview
This section provides comprehensive documentation for all available reusable workflows in the GitHub Action Reusable Workflows for Python project.
View Source Code
All workflow source code is available in the GitHub repository.
Workflow Categoriesโ
Testing Workflowsโ
- rw_get_tests - Prepare and discover test items
- rw_run_test - Run tests with single Python version
- rw_uv_run_test - Run tests using UV (ultra-fast Python package manager)
- rw_poetry_run_test - Run tests using Poetry
- rw_run_test_with_multi_py_versions - Run tests with multiple Python versions
- rw_poetry_run_test_with_multi_py_versions - Run tests with Poetry and multiple Python versions
Coverage Workflowsโ
- rw_organize_test_cov_reports - Organize test coverage reports
- rw_upload_test_cov_report - Upload coverage to Codecov, Coveralls, or Codacy
Build & Deployment Workflowsโ
- rw_python_package - Build Python package artifacts
- rw_push_pypi - Publish Python package to PyPI
- rw_pre-building_test - Test package installation before deployment
- rw_checking_deployment_state - Check if deployment is needed
Release Management Workflowsโ
- rw_parse_project_config - Parse project configuration from intent.yaml
- rw_parse_release_intent - Parse release intent and notes
- rw_build_git-tag_and_create_github-release - Create Git tags and GitHub releases
- rw_build_git-tag_and_create_github-release_v2 - Create Git tags and GitHub releases (v2)
- rw_release_validation_complete - Validation release workflow
- rw_release_staging_complete - Staging release workflow
- rw_release_complete - Complete release process with all artifacts
Docker Workflowsโ
- rw_docker_operations - Build, test, and publish Docker images
Documentation Workflowsโ
- rw_docusaurus_operations - Build and deploy Docusaurus documentation
- rw_documentation_deployment - Deploy documentation to GitHub Pages
Code Quality Workflowsโ
- rw_sonarqube_scan - Run SonarQube/SonarCloud analysis
Quick Referenceโ
Common Workflow Patternsโ
Basic CI Pipelineโ
jobs:
test:
uses: Chisanan232/GitHub-Action_Reusable_Workflows-Python/.github/workflows/rw_run_test.yaml@master
with:
python_version: '3.11'
test_type: unit-test
all_test_items_paths: test/unit_test/
Multi-Version Testingโ
jobs:
test:
uses: Chisanan232/GitHub-Action_Reusable_Workflows-Python/.github/workflows/rw_run_test_with_multi_py_versions.yaml@master
with:
test_type: unit-test
all_test_items_paths: test/unit_test/
Complete CI/CD with Coverageโ
jobs:
prepare-tests:
uses: Chisanan232/GitHub-Action_Reusable_Workflows-Python/.github/workflows/rw_get_tests.yaml@master
with:
shell_arg: test/unit_test/
run-tests:
needs: prepare-tests
uses: Chisanan232/GitHub-Action_Reusable_Workflows-Python/.github/workflows/rw_run_test.yaml@master
with:
python_version: '3.11'
test_type: unit-test
all_test_items_paths: ${{ needs.prepare-tests.outputs.all_test_items }}
coverage:
needs: run-tests
uses: Chisanan232/GitHub-Action_Reusable_Workflows-Python/.github/workflows/rw_organize_test_cov_reports.yaml@master
with:
test_type: unit-test
upload-coverage:
needs: coverage
uses: Chisanan232/GitHub-Action_Reusable_Workflows-Python/.github/workflows/rw_upload_test_cov_report.yaml@master
secrets:
codecov_token: ${{ secrets.CODECOV_TOKEN }}
with:
test_type: unit-test
upload-to-codecov: true
codecov_flags: unittests
codecov_name: my-project
Workflow Naming Conventionโ
All reusable workflows follow the naming pattern: rw_<functionality>.yaml
rw_prefix indicates a reusable workflow- Descriptive name indicates the workflow's purpose
.yamlextension for YAML files
Input Typesโ
Workflows accept three types of inputs:
- Required Inputs: Must be provided for the workflow to run
- Optional Inputs: Have default values, can be overridden
- Secrets: Sensitive data like API tokens and credentials
Output Usageโ
Many workflows provide outputs that can be used by subsequent jobs:
jobs:
job1:
uses: ./.github/workflows/some_workflow.yaml
# ... workflow configuration
job2:
needs: job1
runs-on: ubuntu-latest
steps:
- name: Use output from job1
run: echo "${{ needs.job1.outputs.some_output }}"
Best Practicesโ
- Version Pinning: Use specific versions (tags or commit SHAs) in production
- Secrets Management: Store sensitive data in GitHub Secrets
- Job Dependencies: Use
needsto create proper job dependencies - Error Handling: Review workflow logs regularly
- Documentation: Document your workflow configurations with comments
Complete Workflow Referenceโ
Below is a complete list of all available reusable workflows with direct links to their source code:
| Workflow Name | Category | Description | Source Code |
|---|---|---|---|
rw_get_tests.yaml | Testing | Discover test items | View |
rw_run_test.yaml | Testing | Run tests (single Python version) | View |
rw_uv_run_test.yaml | Testing | Run tests with UV (ultra-fast) | View |
rw_poetry_run_test.yaml | Testing | Run tests with Poetry | View |
rw_run_test_with_multi_py_versions.yaml | Testing | Run tests (multiple Python versions) | View |
rw_poetry_run_test_with_multi_py_versions.yaml | Testing | Run tests with Poetry (multi-version) | View |
rw_organize_test_cov_reports.yaml | Coverage | Organize coverage reports | View |
rw_upload_test_cov_report.yaml | Coverage | Upload coverage to platforms | View |
rw_pre-building_test.yaml | Build | Test package installation | View |
rw_checking_deployment_state.yaml | Deployment | Check deployment state | View |
rw_push_pypi.yaml | Deployment | Publish to PyPI | View |
rw_python_package.yaml | Build | Build Python package | View |
rw_parse_project_config.yaml | Release | Parse project configuration | View |
rw_parse_release_intent.yaml | Release | Parse release intent | View |
rw_build_git-tag_and_create_github-release.yaml | Release | Create Git tags and releases | View |
rw_build_git-tag_and_create_github-release_v2.yaml | Release | Create Git tags and releases (v2) | View |
rw_release_complete.yaml | Release | Complete release process | View |
rw_release_staging_complete.yaml | Release | Staging release workflow | View |
rw_release_validation_complete.yaml | Release | Validation release workflow | View |
rw_docker_operations.yaml | Docker | Build and publish Docker images | View |
rw_docusaurus_operations.yaml | Documentation | Build and deploy Docusaurus docs | View |
rw_documentation_deployment.yaml | Documentation | Deploy docs to GitHub Pages | View |
rw_sonarqube_scan.yaml | Code Quality | SonarQube/SonarCloud analysis | View |