Skip to content

Commit

Permalink
chore: Migrate CI to github actions. (#30)
Browse files Browse the repository at this point in the history
  • Loading branch information
kinyoklion authored Dec 2, 2024
1 parent 708da99 commit 3a5c660
Show file tree
Hide file tree
Showing 4 changed files with 66 additions and 40 deletions.
38 changes: 0 additions & 38 deletions .circleci/config.yml

This file was deleted.

64 changes: 64 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: CI

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:
linux:
runs-on: ubuntu-latest

services:
redis:
image: redis
ports:
- 6379:6379

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.ServerSdk.Redis -f netstandard2.0
- run: dotnet test test/LaunchDarkly.ServerSdk.Redis.Tests -f net8.0

windows:
runs-on: windows-latest

defaults:
run:
shell: powershell

steps:
- uses: actions/checkout@v4

- name: Setup dotnet build tools
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0

- name: Setup Redis
run: |
$ProgressPreference = "SilentlyContinue"
iwr -outf redis.zip https://github.com/MicrosoftArchive/redis/releases/download/win-3.0.504/Redis-x64-3.0.504.zip
mkdir redis
Expand-Archive -Path redis.zip -DestinationPath redis
cd redis
./redis-server --service-install
./redis-server --service-start
Start-Sleep -s 5
./redis-cli ping
- run: dotnet restore
- run: dotnet build src/LaunchDarkly.ServerSdk.Redis -f net462
- run: dotnet test test/LaunchDarkly.ServerSdk.Redis.Tests -f net462
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>netcoreapp3.1</TargetFrameworks>
<TargetFrameworks>net8.0</TargetFrameworks>
<IsPackable>false</IsPackable>
<RootNamespace>LaunchDarkly.Sdk.Server.SharedTests</RootNamespace>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>netcoreapp3.1;net462</TargetFrameworks>
<TargetFrameworks>net8.0;net462</TargetFrameworks>
<IsPackable>false</IsPackable>
<IsTestProject>true</IsTestProject>
<RootNamespace>LaunchDarkly.Sdk.Server.Integrations</RootNamespace>
Expand Down

0 comments on commit 3a5c660

Please sign in to comment.