dev-workflow
작성자: contentstack
Branches, CI, build/test/lint, PR expectations, coverage—standard workflow for Contentstack Utils Swift.
npx skills add https://github.com/contentstack/contentstack-utils-swift --skill dev-workflowDevelopment workflow – Contentstack Utils Swift
When to use
- Setting up locally, opening a PR, or aligning with CI.
- Answering “how do we run tests?” or “which branch targets
master?”
Branches
- Use feature branches (e.g.
feat/...,fix/..., ticket branches). - CI runs on push to
masterand on pull requests targetingmasterornext(.github/workflows/ci.yml). - Merges into
mastermay be gated: PRs whose base ismasterare often expected to come fromstaging; other heads may fail the check-branch workflow (.github/workflows/check-branch.yml). Confirm with your team before opening PRs tomaster.
Running tests and build
- SPM:
swift build,swift test - CI-style Xcode (iOS Simulator):
xcodebuild -project "ContentstackUtils.xcodeproj" -scheme "ContentstackUtils-Package" -destination "OS=13.4.1,name=iPhone 11 Pro" test
Adjust-destinationfor your local Xcode/Simulator.
Run tests before opening a PR. Default tests use offline mocks and fixtures—no .env or live stack credentials.
Lint
- SwiftLint:
swiftlint(.swiftlint.yml)
Pull requests
- Build passes:
swift buildandswift test(andxcodebuildif you touch Xcode-specific paths). - Follow the code-review skill (
skills/code-review/SKILL.md) before merge. - Prefer backward-compatible public API; call out breaking changes and semver.
- Describe behavior and update
CHANGELOG.md/ version metadata (ContentstackUtils.podspec, tags) when releasing—per team process. - Security/policy scans may run in CI (e.g.
.github/workflows/sca-scan.yml,policy-scan.yml).
Optional: TDD
If the team uses TDD: RED → GREEN → REFACTOR. Test structure is in skills/testing/SKILL.md.
Coverage
- Slather (
.slather.yml, schemeContentstackUtils-Package): use after tests to inspectSources/ContentstackUtils/coverage.
References
skills/testing/SKILL.mdskills/code-review/SKILL.md