Skip to content

Commit

Permalink
chore: Sync ci.yml with contrib repo
Browse files Browse the repository at this point in the history
Follows open-feature#173 and open-feature/dotnet-sdk-contrib#134 to synchronize
ci.yml between both repos.

```console
$ diff dotnet-sdk{,-contrib}/.github/workflows/ci.yml

```

Signed-off-by: Austin Drenski <[email protected]>
  • Loading branch information
austindrenski committed Jan 22, 2024
1 parent 26cd5cd commit 2497dd4
Showing 1 changed file with 29 additions and 25 deletions.
54 changes: 29 additions & 25 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Test
name: CI

on:
push:
Expand All @@ -11,44 +11,41 @@ on:
- '**.md'

jobs:
unit-tests-linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
build:
strategy:
matrix:
os: [ ubuntu-latest, windows-latest ]

- name: Setup .NET SDK
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
6.0.x
7.0.x
- name: Run Tests
run: dotnet test test/OpenFeature.Tests/ --configuration Release --logger GitHubActions
runs-on: ${{ matrix.os }}

unit-tests-windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- 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: Run Tests
run: dotnet test test\OpenFeature.Tests\ --configuration Release --logger GitHubActions
- name: Test
run: dotnet test --no-build --logger GitHubActions

packaging:
needs:
- unit-tests-linux
- unit-tests-windows
needs: build

permissions:
contents: read
Expand All @@ -57,14 +54,21 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- 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
Expand Down

0 comments on commit 2497dd4

Please sign in to comment.