Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Migrate to github actions for CI. #6

Merged
merged 3 commits into from
Nov 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
79 changes: 0 additions & 79 deletions .circleci/config.yml

This file was deleted.

33 changes: 33 additions & 0 deletions .github/actions/ci/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: CI
description: Runs CI for the .NET Server SDK
inputs:
sdk:
description: 'The dotnet SDK to use.'
required: false
default: '9'
target_test_framework:
description: 'The target test framework to use.'
required: false
default: 'net9.0'

runs:
using: composite
steps:
- uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ inputs.sdk }}
- run: dotnet restore src/LaunchDarkly.Cache
env:
BUILDFRAMEWORKS: netstandard2.1
TESTFRAMEWORKS: ${{ inputs.target_test_framework }}
shell: bash
- run: dotnet build src/LaunchDarkly.Cache
env:
BUILDFRAMEWORKS: netstandard2.1
TESTFRAMEWORKS: ${{ inputs.target_test_framework }}
shell: bash
- run: dotnet test test/LaunchDarkly.Cache.Tests
env:
BUILDFRAMEWORKS: netstandard2.1
TESTFRAMEWORKS: ${{ inputs.target_test_framework }}
shell: bash
27 changes: 27 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Build and Test

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'
workflow_call:

jobs:
build-test-linux:
strategy:
matrix:
os: ['ubuntu-latest', 'windows-latest']
dotnet: [{sdk: '8.x', test-framework: 'net8.0'}, {sdk: '9.x', test-framework: 'net9.0'}]
runs-on: ${{ matrix.os }}
name: Build ${{ matrix.os }} - ${{ matrix.dotnet.sdk }} - ${{ matrix.dotnet.test-framework }}
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/ci
with:
sdk: ${{ matrix.dotnet.sdk }}
target_test_framework: ${{ matrix.dotnet.test-framework }}
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# LaunchDarkly Caching Tools for .NET

[![CircleCI](https://circleci.com/gh/launchdarkly/dotnet-cache.svg?style=svg)](https://circleci.com/gh/launchdarkly/dotnet-cache)

This library provides a caching abstraction used by other LaunchDarkly .NET assemblies. .NET provides several caching tools, but their functionality differs between .NET Framework and .NET Standard and does not include some desired behaviors.

## Supported .NET versions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
SDKs which do not consider "net5.0" to be a valid target framework that can be
referenced in a project file.
-->
<TestFrameworks Condition="'$(TESTFRAMEWORKS)' == ''">netcoreapp2.1;net5.0;net6.0;net452</TestFrameworks>
<TestFrameworks Condition="'$(TESTFRAMEWORKS)' == ''">net8.0;net9.0</TestFrameworks>
<TargetFrameworks>$(TESTFRAMEWORKS)</TargetFrameworks>
<IsPackable>false</IsPackable>
</PropertyGroup>
Expand Down
Loading