This directory contains GitHub Actions workflows for CI/CD processes in the Useful Cookery project.
Runs checks for the Go backend code:
- Trigger: Push events affecting Go files, all pull requests
- Jobs:
- Lint: Runs Go linting using golangci-lint
- Test: Runs Go tests with race detection and coverage reporting
- Build: Builds Go binaries to verify compilation
Runs checks for the React frontend code:
- Trigger: Push events affecting UI files, all pull requests
- Jobs:
- Lint: Runs JavaScript/TypeScript linting
- Test: Runs frontend tests
- Build: Builds the frontend and archives artifacts
Runs additional project-wide checks:
- Trigger: Push events affecting Markdown files and config files, all pull requests
- Jobs:
- Markdown Lint: Validates Markdown files
- Format Check: Ensures code formatting standards are met using Prettier
- Check Generated Code: Verifies that generated code is up to date with the GraphQL schema
Validates pull requests before they can be merged:
- Trigger: All pull requests
- Jobs:
- PR Validation: Checks for Linear issue references (USE-*) and merge conflicts
- Required Checks: Ensures all individual CI jobs have passed
To fully implement the CI/CD process, set up the following branch protection rules for the main
branch:
-
Require status checks to pass before merging
- Required status checks:
- Backend CI
- Frontend CI
- Additional Checks
- PR Checks
- Required status checks:
-
Require pull request reviews before merging
- Require at least 1 approval
- Dismiss stale pull request approvals when new commits are pushed
-
Require linear history
- Prevent merge commits
- Prefer squash merging
-
Do not allow bypassing the above settings
The CI workflows leverage targets defined in the project's Makefile:
lint-go
: Runs Go lintingtest-go
: Runs Go tests with coveragebuild-go
: Builds Go binaries
lint-ui
: Runs UI lintingtest-ui
: Runs UI testsbuild-ui
: Builds UI
lint-md
: Runs Markdown lintingformat
: Formats all codeformat-ui
: Formats UI codeformat-md
: Formats Markdownformat-check
: Checks all code formattingformat-check-ui
: Checks UI code formattingformat-check-md
: Checks Markdown formattinggenerate
: Generates code from GraphQL schema
lint
: Runs all linterstest
: Runs all testsbuild
: Builds everything
These targets are also available for local development to ensure consistency between CI and local environments. For a complete list of available make targets, run:
make help