-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: add scripts to validate that public API has not changed (#152)
* ci: add scripts to validate that public API has not changed * ci: install sourcekitten * ci: setup ssh-agent * ci: add more info on rememdy * ci: add documentation + refactor * ci: add support for ConfidenceProvider in API diff
- Loading branch information
Showing
8 changed files
with
578 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,22 @@ on: | |
- 'main' | ||
|
||
jobs: | ||
API-diff: | ||
strategy: | ||
matrix: | ||
module: ["ConfidenceProvider", "Confidence"] | ||
runs-on: macOS-latest | ||
steps: | ||
- name: install sourcekitten | ||
run: brew install sourcekitten | ||
- uses: actions/checkout@v3 | ||
- name: webfactory/ssh-agent | ||
uses: webfactory/[email protected] | ||
with: | ||
ssh-private-key: ${{ secrets.SDK_REPO_PRIVATE_KEY }} | ||
- name: Run public API diff | ||
run: scripts/api_diff.sh ${{ matrix.module }} | ||
|
||
Tests: | ||
runs-on: macOS-latest | ||
steps: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,4 +8,5 @@ DerivedData/ | |
.netrc | ||
.build | ||
.mockingbird | ||
project.json | ||
project.json | ||
scripts/raw_api.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
[ | ||
{ | ||
"className": "ConfidenceFeatureProvider", | ||
"apiFunctions": [ | ||
{ | ||
"name": "init(confidence:initializationStrategy:)", | ||
"declaration": "public convenience init(confidence: Confidence, initializationStrategy: InitializationStrategy = .fetchAndActivate)" | ||
}, | ||
{ | ||
"name": "initialize(initialContext:)", | ||
"declaration": "public func initialize(initialContext: OpenFeature.EvaluationContext?)" | ||
}, | ||
{ | ||
"name": "onContextSet(oldContext:newContext:)", | ||
"declaration": "public func onContextSet(\n oldContext: OpenFeature.EvaluationContext?,\n newContext: OpenFeature.EvaluationContext\n)" | ||
}, | ||
{ | ||
"name": "getBooleanEvaluation(key:defaultValue:context:)", | ||
"declaration": "public func getBooleanEvaluation(key: String, defaultValue: Bool, context: EvaluationContext?) throws\n-> OpenFeature.ProviderEvaluation<Bool>" | ||
}, | ||
{ | ||
"name": "getStringEvaluation(key:defaultValue:context:)", | ||
"declaration": "public func getStringEvaluation(key: String, defaultValue: String, context: EvaluationContext?) throws\n-> OpenFeature.ProviderEvaluation<String>" | ||
}, | ||
{ | ||
"name": "getIntegerEvaluation(key:defaultValue:context:)", | ||
"declaration": "public func getIntegerEvaluation(key: String, defaultValue: Int64, context: EvaluationContext?) throws\n-> OpenFeature.ProviderEvaluation<Int64>" | ||
}, | ||
{ | ||
"name": "getDoubleEvaluation(key:defaultValue:context:)", | ||
"declaration": "public func getDoubleEvaluation(key: String, defaultValue: Double, context: EvaluationContext?) throws\n-> OpenFeature.ProviderEvaluation<Double>" | ||
}, | ||
{ | ||
"name": "getObjectEvaluation(key:defaultValue:context:)", | ||
"declaration": "public func getObjectEvaluation(key: String, defaultValue: OpenFeature.Value, context: EvaluationContext?)\nthrows -> OpenFeature.ProviderEvaluation<OpenFeature.Value>" | ||
}, | ||
{ | ||
"name": "observe()", | ||
"declaration": "public func observe() -> AnyPublisher<OpenFeature.ProviderEvent, Never>" | ||
} | ||
] | ||
} | ||
] |
Oops, something went wrong.