Skip to content

Commit

Permalink
Merge branch 'main' into add-open-feature-extensions-hosting
Browse files Browse the repository at this point in the history
Signed-off-by: André Silva <[email protected]>
  • Loading branch information
askpt committed Apr 11, 2024
2 parents c6de9e3 + bc8301d commit 1fc6d51
Show file tree
Hide file tree
Showing 6 changed files with 95 additions and 89 deletions.
124 changes: 63 additions & 61 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,30 +19,31 @@ jobs:
runs-on: ${{ matrix.os }}

steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: recursive

- name: Setup .NET SDK
uses: actions/setup-dotnet@v4
env:
NUGET_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
dotnet-version: |
6.0.x
7.0.x
source-url: https://nuget.pkg.github.com/open-feature/index.json

- name: Restore
run: dotnet restore

- name: Build
run: dotnet build --no-restore

- name: Test
run: dotnet test --no-build --logger GitHubActions
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: recursive

- name: Setup .NET SDK
uses: actions/setup-dotnet@v4
env:
NUGET_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
dotnet-version: |
6.0.x
7.0.x
8.0.x
source-url: https://nuget.pkg.github.com/open-feature/index.json

- name: Restore
run: dotnet restore

- name: Build
run: dotnet build --no-restore

- name: Test
run: dotnet test --no-build --logger GitHubActions

packaging:
needs: build
Expand All @@ -54,40 +55,41 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: recursive

- name: Setup .NET SDK
uses: actions/setup-dotnet@v4
env:
NUGET_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
dotnet-version: |
6.0.x
7.0.x
source-url: https://nuget.pkg.github.com/open-feature/index.json

- name: Restore
run: dotnet restore

- name: Pack NuGet packages (CI versions)
if: startsWith(github.ref, 'refs/heads/')
run: dotnet pack --no-restore --version-suffix "ci.$(date -u +%Y%m%dT%H%M%S)+sha.${GITHUB_SHA:0:9}"

- name: Pack NuGet packages (PR versions)
if: startsWith(github.ref, 'refs/pull/')
run: dotnet pack --no-restore --version-suffix "pr.$(date -u +%Y%m%dT%H%M%S)+sha.${GITHUB_SHA:0:9}"

- name: Publish NuGet packages (base)
if: github.event.pull_request.head.repo.fork == false
run: dotnet nuget push "src/**/*.nupkg" --api-key "${{ secrets.GITHUB_TOKEN }}" --source https://nuget.pkg.github.com/open-feature/index.json

- name: Publish NuGet packages (fork)
if: github.event.pull_request.head.repo.fork == true
uses: actions/[email protected]
with:
name: nupkgs
path: src/**/*.nupkg
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: recursive

- name: Setup .NET SDK
uses: actions/setup-dotnet@v4
env:
NUGET_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
dotnet-version: |
6.0.x
7.0.x
8.0.x
source-url: https://nuget.pkg.github.com/open-feature/index.json

- name: Restore
run: dotnet restore

- name: Pack NuGet packages (CI versions)
if: startsWith(github.ref, 'refs/heads/')
run: dotnet pack --no-restore --version-suffix "ci.$(date -u +%Y%m%dT%H%M%S)+sha.${GITHUB_SHA:0:9}"

- name: Pack NuGet packages (PR versions)
if: startsWith(github.ref, 'refs/pull/')
run: dotnet pack --no-restore --version-suffix "pr.$(date -u +%Y%m%dT%H%M%S)+sha.${GITHUB_SHA:0:9}"

- name: Publish NuGet packages (base)
if: github.event.pull_request.head.repo.fork == false
run: dotnet nuget push "src/**/*.nupkg" --api-key "${{ secrets.GITHUB_TOKEN }}" --source https://nuget.pkg.github.com/open-feature/index.json

- name: Publish NuGet packages (fork)
if: github.event.pull_request.head.repo.fork == true
uses: actions/[email protected]
with:
name: nupkgs
path: src/**/*.nupkg
14 changes: 8 additions & 6 deletions .github/workflows/code-coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ jobs:
runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup .NET SDK
uses: actions/setup-dotnet@v4
Expand All @@ -31,13 +31,15 @@ jobs:
dotnet-version: |
6.0.x
7.0.x
8.0.x
source-url: https://nuget.pkg.github.com/open-feature/index.json

- name: Run Test
run: dotnet test --verbosity normal /p:CollectCoverage=true /p:CoverletOutputFormat=opencover
- name: Run Test
run: dotnet test --verbosity normal /p:CollectCoverage=true /p:CoverletOutputFormat=opencover

- uses: codecov/codecov-action@v3.1.6
- uses: codecov/codecov-action@v4.3.0
with:
name: Code Coverage for ${{ matrix.os }}
fail_ci_if_error: true
verbose: true
token: ${{ secrets.CODECOV_UPLOAD_TOKEN }}
37 changes: 19 additions & 18 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,24 +14,25 @@ jobs:
e2e-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup .NET SDK
uses: actions/setup-dotnet@v4
env:
NUGET_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
dotnet-version: |
6.0.x
7.0.x
source-url: https://nuget.pkg.github.com/open-feature/index.json
- name: Setup .NET SDK
uses: actions/setup-dotnet@v4
env:
NUGET_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
dotnet-version: |
6.0.x
7.0.x
8.0.x
source-url: https://nuget.pkg.github.com/open-feature/index.json

- name: Initialize Tests
run: |
git submodule update --init --recursive
cp spec/specification/assets/gherkin/evaluation.feature test/OpenFeature.E2ETests/Features/
- name: Initialize Tests
run: |
git submodule update --init --recursive
cp spec/specification/assets/gherkin/evaluation.feature test/OpenFeature.E2ETests/Features/
- name: Run Tests
run: dotnet test test/OpenFeature.E2ETests/ --configuration Release --logger GitHubActions
- name: Run Tests
run: dotnet test test/OpenFeature.E2ETests/ --configuration Release --logger GitHubActions
1 change: 1 addition & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ jobs:
dotnet-version: |
6.0.x
7.0.x
8.0.x
source-url: https://nuget.pkg.github.com/open-feature/index.json

- name: Install dependencies
Expand Down
6 changes: 3 additions & 3 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

<ItemGroup Label="src">
<PackageVersion Include="Microsoft.Bcl.AsyncInterfaces" Version="8.0.0" />
<PackageVersion Include="Microsoft.Extensions.Hosting.Abstractions" Version="8.0.0" />
<PackageVersion Include="Microsoft.Extensions.Logging.Abstractions" Version="8.0.0" />
<PackageVersion Include="Microsoft.Extensions.Hosting.Abstractions" Version="8.0.1" />
<PackageVersion Include="Microsoft.Extensions.Logging.Abstractions" Version="8.0.1" />
<PackageVersion Include="System.Collections.Immutable" Version="1.7.1" />
<PackageVersion Include="System.Threading.Channels" Version="6.0.0" />
<PackageVersion Include="System.ValueTuple" Version="4.5.0" />
Expand All @@ -34,4 +34,4 @@
<PackageVersion Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.3" />
</ItemGroup>

</Project>
</Project>
2 changes: 1 addition & 1 deletion global.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"sdk": {
"rollForward": "latestFeature",
"version": "8.0.100"
"version": "8.0.203"
}
}

0 comments on commit 1fc6d51

Please sign in to comment.