1.9 KiB
1.9 KiB
GitHub Actions Workflows Guide
This document explains the GitHub Actions workflows set up for this project.
Available Workflows
1. Run Tests Workflow (test.yml)
This workflow runs on pushes to main and develop branches, as well as on pull requests to these branches. It:
- Builds the project
- Runs all tests
- Generates code coverage reports
- Uploads coverage to Codecov
- Updates the test status badge (on push to main)
2. Update Badges Workflow (update-badges.yml)
This workflow runs whenever the "Run Tests" workflow completes. It:
- Updates the test status badge based on the test results (passing/failing)
3. PR Tests Workflow (pr-test.yml)
This workflow runs on pull requests to main and develop branches. It:
- Builds the project
- Runs all tests
- Generates test results and code coverage reports
- Comments on the PR with test results
- Uploads coverage reports to Codecov
4. Build Docker Image Workflow (existing build.yml)
This workflow runs on pushes to the main branch. It:
- Builds the Docker image
- Pushes the image to the GitHub Container Registry
Setting Up Badge Functionality
To enable the badge functionality, follow the instructions in BADGE_SETUP.md.
GitHub Secrets
The following GitHub Secrets are required:
GIST_SECRET: A GitHub Personal Access Token withgistscopeGIST_ID: The ID of the GitHub Gist used to store badge data
Badge in README
The README includes two badges:
- Build Status: Shows the status of the most recent build workflow
- Tests Status: Shows whether the tests are passing or failing
Workflow Customization
You can customize these workflows by editing the YAML files in the .github/workflows directory:
.github/workflows/test.yml.github/workflows/update-badges.yml.github/workflows/pr-test.yml.github/workflows/build.yml