Skip to content

Commit

Permalink
Merge pull request #80 from OrleansContrib/orleans-3.0
Browse files Browse the repository at this point in the history
Update to Orleans 3.0
  • Loading branch information
seniorquico authored Oct 25, 2019
2 parents 9514870 + f2dad33 commit 4f48027
Show file tree
Hide file tree
Showing 54 changed files with 811 additions and 750 deletions.
12 changes: 12 additions & 0 deletions .config/dotnet-tools.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"version": 1,
"isRoot": true,
"tools": {
"codecov.tool": {
"version": "1.7.2",
"commands": [
"codecov"
]
}
}
}
4 changes: 4 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,10 @@ csharp_space_between_method_call_empty_parameter_list_parentheses = false
csharp_preserve_single_line_statements = false
csharp_preserve_single_line_blocks = true

[*.cs]
dotnet_diagnostic.CA1030.severity = none
dotnet_diagnostic.CA1303.severity = none

##### Documents #####

[*.{json,json5,xml}]
Expand Down
38 changes: 38 additions & 0 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Continuous Integration

on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
build-and-test:
name: Build and Test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Build
run: |
dotnet restore --verbosity minimal
dotnet build --configuration Release --no-restore --verbosity minimal /p:TreatWarningsAsErrors=true /warnaserror
dotnet pack --configuration Release --no-restore --verbosity minimal
- name: Test
run: |
dotnet test --configuration Release --no-build --no-restore --verbosity minimal /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:Include="[OrleansTestKit]*"
- name: Upload NuGet Packages
uses: actions/upload-artifact@v1
with:
name: Packages
path: artifacts/Release/
# TODO: Need to create CODECOV_TOKEN secret.
- name: Upload Code Coverage Results
env:
CI: "true"
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
run: |
dotnet tool restore --verbosity minimal
dotnet codecov --dump --file test/OrleansTestKit.Tests/coverage.opencover.xml --required
30 changes: 30 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Publish

on:
release:
types:
- published

jobs:
publish-to-nuget:
name: Publish to NuGet
runs-on: ubuntu-latest
steps:
- name: Download NuGet Packages
id: download_nuget_packages
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
urls=( $( echo "${GITHUB_CONTEXT}" | jq --raw-output '.event.release.assets[] | .url' ) )
for url in "${urls[@]}"
do
curl --header 'Accept: application/octet-stream' --header "Authorization: token ${GITHUB_TOKEN}" --location --remote-header-name --remote-name "${url}"
done
nupkg_files=(*.nupkg)
echo "::set-output name=nupkg_name::$( basename ${nupkg_files[-1]} )"
- name: Publish NuGet Packages
env:
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
run: |
dotnet nuget push "${{ steps.download_nuget_packages.outputs.nupkg_name }}" -k "${NUGET_API_KEY}" -s https://api.nuget.org/v3/index.json
54 changes: 54 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Release

on:
push:
tags:
- "*"

jobs:
release-to-github:
name: Release to GitHub
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Build
id: build
run: |
dotnet restore --verbosity minimal
dotnet build --configuration Release --no-restore --verbosity minimal /p:TreatWarningsAsErrors=true /warnaserror
dotnet pack --configuration Release --no-restore --verbosity minimal
nupkg_files=(artifacts/Release/*.nupkg)
echo "::set-output name=nupkg_name::$( basename ${nupkg_files[-1]} )"
echo "::set-output name=nupkg_path::${nupkg_files[-1]}"
snupkg_files=(artifacts/Release/*.snupkg)
echo "::set-output name=snupkg_name::$( basename ${snupkg_files[-1]} )"
echo "::set-output name=snupkg_path::${snupkg_files[-1]}"
- name: Create GitHub Release
id: create_github_release
uses: actions/create-release@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
draft: true
prerelease: false
- name: Upload NuGet Package
uses: actions/upload-release-asset@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
asset_content_type: application/zip
asset_name: ${{ steps.build.outputs.nupkg_name }}
asset_path: ${{ steps.build.outputs.nupkg_path }}
upload_url: ${{ steps.create_github_release.outputs.upload_url }}
- name: Upload NuGet Symbol Package
uses: actions/upload-release-asset@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
asset_content_type: application/zip
asset_name: ${{ steps.build.outputs.snupkg_name }}
asset_path: ${{ steps.build.outputs.snupkg_path }}
upload_url: ${{ steps.create_github_release.outputs.upload_url }}
11 changes: 11 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"version": "0.2.0",
"configurations": [
{
"name": ".NET Core Attach",
"type": "coreclr",
"request": "attach",
"processId": "${command:pickProcess}"
}
]
}
1 change: 1 addition & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@
"files.autoSave": "afterDelay",
"files.autoSaveDelay": 30000,
"omnisharp.defaultLaunchSolution": "OrleansTestKit.sln",
"omnisharp.enableRoslynAnalyzers": true,
"omnisharp.useEditorFormattingSettings": false
}
19 changes: 1 addition & 18 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"type": "process",
"args": [
"build",
"${workspaceFolder}/test/OrleansTestKit.Tests/OrleansTestKit.Tests.csproj"
"${workspaceFolder}/OrleansTestKit.sln"
],
"problemMatcher": "$msCompile",
"group": {
Expand All @@ -28,23 +28,6 @@
"kind": "test",
"isDefault": true
}
},
{
"label": "test with coverage",
"command": "dotnet",
"type": "process",
"args": [
"test",
"/p:CollectCoverage=true",
"/p:CoverletOutputFormat=lcov",
"/p:CoverletOutput=./lcov.info",
"${workspaceFolder}/test/OrleansTestKit.Tests/OrleansTestKit.Tests.csproj"
],
"problemMatcher": "$msCompile",
"group": {
"kind": "test",
"isDefault": true
}
}
]
}
8 changes: 8 additions & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<Project>

<PropertyGroup>
<SourceRoot>$(MSBuildThisFileDirectory)</SourceRoot>
</PropertyGroup>

</Project>
3 changes: 3 additions & 0 deletions OrleansTestKit.code-workspace
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
{
"folders": [
{
"name": "OrleansTestKit",
"path": "."
}
],
"settings": {
"dotnet-test-explorer.testProjectPath": "./test/OrleansTestKit.Tests",
"editor.formatOnSave": true,
"editor.minimap.maxColumn": 120,
"editor.minimap.showSlider": "always",
Expand All @@ -13,6 +15,7 @@
"files.autoSave": "afterDelay",
"files.autoSaveDelay": 30000,
"omnisharp.defaultLaunchSolution": "OrleansTestKit.sln",
"omnisharp.enableRoslynAnalyzers": true,
"omnisharp.useEditorFormattingSettings": false
}
}
2 changes: 1 addition & 1 deletion OrleansTestKit.sln
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.28803.452
VisualStudioVersion = 16.0.29409.12
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{54C04CF7-7044-46E0-BC24-2A992F028557}"
EndProject
Expand Down
8 changes: 3 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Orleans TestKit

[![AppVeyor build status](https://ci.appveyor.com/api/projects/status/k4crsho9d5vlbcgg/branch/master?svg=true)](https://ci.appveyor.com/project/dsarfati/orleanstestkit/branch/master) [![codecov test status](https://codecov.io/gh/OrleansContrib/OrleansTestKit/branch/master/graph/badge.svg)](https://codecov.io/gh/OrleansContrib/OrleansTestKit) [![NuGet package version](https://img.shields.io/nuget/v/OrleansTestKit.svg?style=flat)](http://www.nuget.org/packages/OrleansTestKit/) [![MIT license](https://img.shields.io/badge/license-MIT-yellow.svg)](https://github.com/OrleansContrib/OrleansTestKit/blob/master/LICENSE) [![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/dotnet/orleans?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
[![GitHub build status](https://github.com/OrleansContrib/OrleansTestKit/workflows/Continuous%20Integration/badge.svg)](https://github.com/OrleansContrib/OrleansTestKit/actions) [![codecov test status](https://codecov.io/gh/OrleansContrib/OrleansTestKit/branch/master/graph/badge.svg)](https://codecov.io/gh/OrleansContrib/OrleansTestKit) [![NuGet package version](https://img.shields.io/nuget/v/OrleansTestKit.svg?style=flat)](http://www.nuget.org/packages/OrleansTestKit/) [![MIT license](https://img.shields.io/badge/license-MIT-yellow.svg)](https://github.com/OrleansContrib/OrleansTestKit/blob/master/LICENSE) [![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/dotnet/orleans?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)

The Orleans TestKit is an easy-to-use toolkit for unit testing the grain logic of applications built with [Microsoft Orleans](http://dotnet.github.io/orleans/). The Orleans TestKit is intended to augment the [`TestCluster` unit testing approach](http://dotnet.github.io/orleans/Documentation/tutorials_and_samples/testing.html) provided by the official `Microsoft.Orleans.TestingHost` NuGet package.

Expand Down Expand Up @@ -28,11 +28,9 @@ See [issue #47](https://github.com/OrleansContrib/OrleansTestKit/issues/47) for

## Build Artifacts

The stable build artifacts are located on [NuGet](http://www.nuget.org/packages/OrleansTestKit/).
The build artifacts for tagged commits are published to [NuGet](http://www.nuget.org/packages/OrleansTestKit/) and copied to [GitHub Releases](https://github.com/OrleansContrib/OrleansTestKit/releases).

The latest `master` branch build artifacts are located on [AppVeyor](https://ci.appveyor.com/project/dsarfati/orleanstestkit/branch/master/artifacts). AppVeyor also provides a NuGet feed with various `master` branch build artifacts:

> https://ci.appveyor.com/nuget/orleanstestkit
The build artifacts for pull request commits and `master` branch commits are attached to the individual [Continuous Integration workflow logs](https://github.com/OrleansContrib/OrleansTestKit/actions).

## Community

Expand Down
49 changes: 0 additions & 49 deletions appveyor.yml

This file was deleted.

Binary file added assets/logo_128.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion global.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"sdk": {
"version": "2.2.103"
"version": "3.0.100"
}
}
5 changes: 4 additions & 1 deletion omnisharp.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,5 +51,8 @@
"UseTabs": false,
"WrappingKeepStatementsOnSingleLine": false,
"WrappingPreserveSingleLine": true
},
"RoslynExtensionsOptions": {
"enableAnalyzersSupport": true
}
}
}
10 changes: 10 additions & 0 deletions src/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<Project>

<PropertyGroup>
<_ParentDirectoryBuildPropsPath Condition=" '$(_DirectoryBuildPropsFile)' != '' ">$([System.IO.Path]::Combine('..', '$(_DirectoryBuildPropsFile)'))</_ParentDirectoryBuildPropsPath>
</PropertyGroup>

<Import Project="$(_ParentDirectoryBuildPropsPath)" Condition=" Exists('$(_ParentDirectoryBuildPropsPath)') " />

</Project>
10 changes: 10 additions & 0 deletions src/OrleansTestKit/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<Project>

<PropertyGroup>
<_ParentDirectoryBuildPropsPath Condition=" '$(_DirectoryBuildPropsFile)' != '' ">$([System.IO.Path]::Combine('..', '$(_DirectoryBuildPropsFile)'))</_ParentDirectoryBuildPropsPath>
</PropertyGroup>

<Import Project="$(_ParentDirectoryBuildPropsPath)" Condition=" Exists('$(_ParentDirectoryBuildPropsPath)') " />

</Project>
Loading

0 comments on commit 4f48027

Please sign in to comment.