vrcauthproxy/.github/BADGE_SETUP.md
MiscFrizzy 319f1071bf feat(ci): Add GitHub Actions workflows for test automation and status badges
Add comprehensive test automation setup with GitHub Actions:
- Create test.yml for running tests on main/develop branches
- Add pr-test.yml for PR validation with test results comments
- Add update-badges.yml for dynamic test status badge updates
- Configure code coverage reporting with Codecov integration

Documentation:
- Add BADGE_SETUP.md with instructions for configuring test status badges
- Add WORKFLOWS_GUIDE.md explaining CI/CD workflow setup
- Update README.md with build and test status badges

Test Framework:
- Configure test project to use .NET 9.0
- Set up test coverage reporting with coverlet
- Add integration tests with WireMock for API mocking
- Add unit tests for configuration and HTTP client components
- Document testing strategy in TestingStrategy.md

Build:
- Add Dockerfile.test for containerized testing
- Update .gitignore for test artifacts
- Configure test dependencies in VRCAuthProxy.Tests.csproj

This change enables automated testing on PRs and branches, with visual status indicators and detailed test results in PR comments.
2025-04-07 06:30:31 -04:00

1.6 KiB

Setting Up GitHub Badges

This document explains how to set up the GitHub Secrets required for the test status badge functionality.

Steps to Create a GitHub Gist for Badge Storage

  1. Create a new public GitHub Gist at https://gist.github.com/

    • Add a file named vrcauthproxy-tests.json with the following content:
    {
      "schemaVersion": 1,
      "label": "tests",
      "message": "unknown",
      "color": "lightgrey"
    }
    
    • Save the Gist
  2. Note the Gist ID from the URL

    • The URL will look like: https://gist.github.com/YOUR_USERNAME/GIST_ID
    • Copy the GIST_ID part

Creating GitHub Secrets

  1. In your VRCAuthProxy repository, go to Settings > Secrets and variables > Actions

  2. Create the following secrets:

    • GIST_ID

      • Value: The Gist ID you copied in step 2 above
    • GIST_SECRET

      • Value: A GitHub Personal Access Token (PAT) with gist scope
      • To create a PAT, go to your GitHub account Settings > Developer settings > Personal access tokens > Tokens (classic)
      • Generate a new token with at least the gist scope
      • Copy the token value (you won't be able to see it again after leaving the page)
  3. Update the README.md badge URL

    • Replace USER_PLACEHOLDER with your GitHub username
    • Replace GIST_ID_PLACEHOLDER with your Gist ID

Testing the Setup

After setting up the secrets and updating the README.md, push a commit to the main branch to trigger the workflow that will update the badge status.

If everything is set up correctly, the badge in the README should display the current test status (passing or failing).