diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index 46df88c..0000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,72 +0,0 @@ -version: 2.1 - -orbs: - win: circleci/windows@1.0.0 - -workflows: - version: 2 - test: - jobs: - - test_linux: - name: .NET Core 3.1 - docker-image: mcr.microsoft.com/dotnet/core/sdk:3.1-focal - test-target-framework: netcoreapp3.1 - - test_linux: - name: .NET 6.0 - docker-image: mcr.microsoft.com/dotnet/sdk:6.0-focal - test-target-framework: net6.0 - - test_windows: - name: .NET Framework 4.6.2 - test-target-framework: net462 - -jobs: - test_linux: - parameters: - docker-image: - type: string - test-target-framework: - type: string - docker: - - image: <> - environment: - ASPNETCORE_SUPPRESSSTATUSMESSAGES: true - TESTFRAMEWORK: <> - steps: - - run: - name: install packages - command: apt-get -q update && apt-get install -qy awscli - - checkout - - run: - name: build - command: dotnet build src/LaunchDarkly.EventSource -f netstandard2.0 - - run: - name: run tests - command: | - dotnet test \ - -l "junit;LogFilePath=/tmp/circle-reports/unit-tests-commonsdk.xml" \ - test/LaunchDarkly.EventSource.Tests/LaunchDarkly.EventSource.Tests.csproj - - store_test_results: - path: /tmp/circle-reports - - test_windows: - parameters: - test-target-framework: - type: string - executor: - name: win/vs2019 - shell: powershell.exe - environment: - TESTFRAMEWORK: <> - steps: - - checkout - - run: - name: build - command: dotnet build src/LaunchDarkly.EventSource - - run: - name: run tests - command: | - dotnet test \ - -l "junit;LogFilePath=/tmp/circle-reports/unit-tests-commonsdk.xml" \ - test/LaunchDarkly.EventSource.Tests/LaunchDarkly.EventSource.Tests.csproj - - store_test_results: - path: /tmp/circle-reports diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..921cc1a --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,37 @@ +name: Build and run +on: + push: + branches: [ main, 'feat/**' ] + paths-ignore: + - '**.md' # Do not need to run CI for markdown changes. + pull_request: + branches: [ main, 'feat/**' ] + paths-ignore: + - '**.md' + +jobs: + build-and-run: + strategy: + matrix: + target: + - os: windows-latest + - os: ubuntu-latest + fail-fast: false + runs-on: ${{ matrix.target.os }} + + permissions: + id-token: write # Needed if using OIDC to get release secrets. + + steps: + - uses: actions/checkout@v4 + + - name: Setup dotnet build tools + uses: actions/setup-dotnet@v4 + with: + dotnet-version: 8.0 + + - run: dotnet restore + + - run: dotnet build src/LaunchDarkly.EventSource/LaunchDarkly.EventSource.csproj + + - run: dotnet test test/LaunchDarkly.EventSource.Tests/LaunchDarkly.EventSource.Tests.csproj diff --git a/README.md b/README.md index 4ff1a13..3fe4b0b 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # LaunchDarkly EventSource SSE Client for .NET [![NuGet](https://img.shields.io/nuget/v/LaunchDarkly.EventSource.svg?style=flat-square)](https://www.nuget.org/packages/LaunchDarkly.EventSource/) -[![CircleCI](https://circleci.com/gh/launchdarkly/dotnet-eventsource.svg?style=shield)](https://circleci.com/gh/launchdarkly/dotnet-eventsource) +[![Build and run](https://github.com/launchdarkly/dotnet-eventsource/actions/workflows/ci.yml/badge.svg)](https://github.com/launchdarkly/dotnet-eventsource/actions/workflows/ci.yml) [![Documentation](https://img.shields.io/static/v1?label=GitHub+Pages&message=API+reference&color=00add8)](https://launchdarkly.github.io/dotnet-eventsource) ## Overview @@ -37,7 +37,7 @@ Public key token is 18e8c36453e3060f We encourage pull requests and other contributions from the community. Check out our [contributing guidelines](CONTRIBUTING.md) for instructions on how to contribute to this project. ## About LaunchDarkly - + * LaunchDarkly is a continuous delivery platform that provides feature flags as a service and allows developers to iterate quickly and safely. We allow you to easily flag your features and manage them from the LaunchDarkly dashboard. With LaunchDarkly, you can: * Roll out a new feature to a subset of your users (like a group of users who opt-in to a beta tester group), gathering feedback and bug reports from real-world use cases. * Gradually roll out a feature to an increasing percentage of users, and track the effect that the feature has on key metrics (for instance, how likely is a user to complete a purchase if they have feature A versus feature B?). diff --git a/test/LaunchDarkly.EventSource.Tests/LaunchDarkly.EventSource.Tests.csproj b/test/LaunchDarkly.EventSource.Tests/LaunchDarkly.EventSource.Tests.csproj index 193d77d..b1043ae 100644 --- a/test/LaunchDarkly.EventSource.Tests/LaunchDarkly.EventSource.Tests.csproj +++ b/test/LaunchDarkly.EventSource.Tests/LaunchDarkly.EventSource.Tests.csproj @@ -1,22 +1,19 @@  - - netcoreapp3.1;net462;net6.0 - $(TESTFRAMEWORK) + net8.0 + $(TargetFrameworks);net462 Copyright © 2017 Catamorphic, Co. - - - - - + + + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + @@ -28,10 +25,4 @@ - - - - PreserveNewest - - diff --git a/test/LaunchDarkly.EventSource.Tests/xunit.runner.json b/test/LaunchDarkly.EventSource.Tests/xunit.runner.json deleted file mode 100644 index 820ecc7..0000000 --- a/test/LaunchDarkly.EventSource.Tests/xunit.runner.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "methodDisplay": "method" -}