|
| 1 | +# GitHub Workflows and Configuration |
| 2 | + |
| 3 | +This directory contains the CI/CD workflows and configuration for the Oproto.FluentDynamoDb project. |
| 4 | + |
| 5 | +## Workflows |
| 6 | + |
| 7 | +### Automated Workflows |
| 8 | + |
| 9 | +- **`build.yml`** - Build validation across multiple platforms (Linux, Windows, macOS) |
| 10 | +- **`test.yml`** - Unit and integration tests with code coverage |
| 11 | +- **`release.yml`** - Automated package building and GitHub release creation |
| 12 | +- **`pr-validation.yml`** - Comprehensive PR validation including changelog checks |
| 13 | +- **`failure-notification.yml`** - Automatic issue creation for workflow failures |
| 14 | + |
| 15 | +### Manual Configuration Required |
| 16 | + |
| 17 | +⚠️ **Branch Protection Rules** must be configured manually through GitHub's web interface. |
| 18 | + |
| 19 | +See [BRANCH_PROTECTION_SETUP.md](./BRANCH_PROTECTION_SETUP.md) for detailed setup instructions. |
| 20 | + |
| 21 | +Quick link: Navigate to **Settings → Branches** in your repository. |
| 22 | + |
| 23 | +## Setup Checklist |
| 24 | + |
| 25 | +- [x] Build workflow configured |
| 26 | +- [x] Test workflow configured |
| 27 | +- [x] Release workflow configured |
| 28 | +- [x] PR validation workflow configured |
| 29 | +- [x] Failure notification workflow configured |
| 30 | +- [ ] **Branch protection rules configured** (requires manual setup) |
| 31 | +- [ ] Dependabot configured (optional) |
| 32 | +- [ ] Status badges added to README (optional) |
| 33 | + |
| 34 | +## Documentation |
| 35 | + |
| 36 | +- [BRANCH_PROTECTION_SETUP.md](./BRANCH_PROTECTION_SETUP.md) - Step-by-step guide for configuring branch protection |
| 37 | +- [MANUAL_SETUP_REQUIRED.md](./MANUAL_SETUP_REQUIRED.md) - Overview of manual configuration steps |
| 38 | + |
| 39 | +## Workflow Triggers |
| 40 | + |
| 41 | +### Build Workflow |
| 42 | +- Push to `main` or `develop` |
| 43 | +- Pull requests to `main` or `develop` |
| 44 | +- Manual dispatch |
| 45 | + |
| 46 | +### Test Workflow |
| 47 | +- Push to `main` or `develop` |
| 48 | +- Pull requests to `main` or `develop` |
| 49 | +- Called by PR validation workflow |
| 50 | +- Manual dispatch |
| 51 | + |
| 52 | +### Release Workflow |
| 53 | +- Push of version tags matching `v*.*.*` (e.g., `v1.0.0`, `v1.2.3-beta.1`) |
| 54 | + |
| 55 | +### PR Validation Workflow |
| 56 | +- Pull request opened, synchronized, or reopened |
| 57 | +- Targets `main` or `develop` |
| 58 | + |
| 59 | +### Failure Notification Workflow |
| 60 | +- Any workflow failure on `main` or `develop` branches |
| 61 | + |
| 62 | +## Status Checks |
| 63 | + |
| 64 | +The following status checks are configured in the workflows: |
| 65 | + |
| 66 | +**Build:** |
| 67 | +- `build (ubuntu-latest)` |
| 68 | +- `build (windows-latest)` |
| 69 | +- `build (macos-latest)` |
| 70 | + |
| 71 | +**Unit Tests:** |
| 72 | +- `unit-tests (ubuntu-latest)` |
| 73 | +- `unit-tests (windows-latest)` |
| 74 | +- `unit-tests (macos-latest)` |
| 75 | + |
| 76 | +**Integration Tests:** |
| 77 | +- `integration-tests (ubuntu-latest)` |
| 78 | +- `integration-tests (windows-latest)` |
| 79 | +- `integration-tests (macos-latest)` |
| 80 | + |
| 81 | +**PR Validation:** |
| 82 | +- `validate-pr` |
| 83 | + |
| 84 | +These status check names must be added to branch protection rules for enforcement. |
| 85 | + |
| 86 | +## Release Process |
| 87 | + |
| 88 | +1. Update CHANGELOG.md with version changes |
| 89 | +2. Commit changelog updates |
| 90 | +3. Create and push version tag: `git tag v1.0.0 && git push origin v1.0.0` |
| 91 | +4. Release workflow automatically: |
| 92 | + - Validates tag format |
| 93 | + - Builds NuGet packages |
| 94 | + - Creates GitHub Release |
| 95 | + - Attaches packages to release |
| 96 | +5. Manually publish packages to NuGet.org (future: automate) |
| 97 | + |
| 98 | +## Troubleshooting |
| 99 | + |
| 100 | +### Workflows Not Running |
| 101 | + |
| 102 | +- Check that workflows are enabled in repository settings |
| 103 | +- Verify trigger conditions match your branch/tag names |
| 104 | +- Check workflow run history for errors |
| 105 | + |
| 106 | +### Status Checks Not Appearing |
| 107 | + |
| 108 | +- Workflows must run at least once before status checks appear |
| 109 | +- Create a test PR to trigger workflows |
| 110 | +- Wait for completion, then check branch protection settings |
| 111 | + |
| 112 | +### Test Failures |
| 113 | + |
| 114 | +- Review workflow logs for detailed error messages |
| 115 | +- Check DynamoDB Local logs for integration test failures |
| 116 | +- Verify all dependencies are properly installed |
| 117 | + |
| 118 | +## Support |
| 119 | + |
| 120 | +For issues with workflows or CI/CD setup: |
| 121 | + |
| 122 | +1. Check the troubleshooting sections in workflow documentation |
| 123 | +2. Review GitHub Actions logs for detailed error messages |
| 124 | +3. Create an issue in the repository with workflow run links |
0 commit comments