Modern Development Practices
GitHub Actions and CI/CD
A workflow is a YAML file stored in .github/workflows/. It declares an on: trigger (such as push, pull_request, schedule, or workflow_dispatch), one or more jobs, and steps inside each job. Jobs run on runners (ubuntu-latest, windows-latest, macos-latest, or self-hosted) and each step either runs a shell command (run:) or uses a published action (uses:). A matrix strategy runs the same job across several versions or operating systems. Secrets are injected as ${{ secrets.NAME }} and must be stored in repository, environment, or organization settings - never committed to the repo.
Automation around the code
Dependabot raises alerts and pull requests for vulnerable or outdated dependencies. Code scanning (for example CodeQL) and secret scanning flag risky patterns. Environments with protection rules and required reviewers gate deployments. Codespaces provide cloud development environments configured by a devcontainer file, and GitHub Pages publishes static sites from a branch or an Actions workflow.
Workflow styles
Trunk-based development keeps short-lived branches merged frequently into the default branch, while feature-branch workflows keep longer branches reviewed before merging. Both rely on small pull requests and automated checks.
Worked example (rule of thumb)
"Tests must run on every pull request" maps to a workflow with on: pull_request, a checkout step, a setup step, and a test step. If the trigger says push only, pull requests will not run it - a very common exam distinction.