Skip to content

Commit

Permalink
chore: Migrate to github actions for CI. (#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
kinyoklion authored Nov 19, 2024
1 parent 6ed6157 commit bec6b0e
Show file tree
Hide file tree
Showing 5 changed files with 61 additions and 82 deletions.
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

0 comments on commit bec6b0e

Please sign in to comment.