-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Anatoly Popov <[email protected]>
- Loading branch information
Showing
13 changed files
with
158 additions
and
91 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
name: Build, Test & Publish nuget | ||
|
||
on: | ||
push: | ||
branches: [ "master" ] | ||
tags: ['*'] | ||
pull_request: | ||
types: [ opened, synchronize ] | ||
branches: [ "master" ] | ||
|
||
env: | ||
NuGetDirectory: ${{ github.workspace }}/nuget | ||
|
||
jobs: | ||
build_test_and_pack: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 # Fetches entire history, so we can analyze commits since last tag | ||
- name: Setup .net core | ||
uses: actions/setup-dotnet@v3 | ||
with: | ||
dotnet-version: | | ||
3.1.x | ||
6.0.x | ||
- name: Restore dependencies | ||
run: dotnet restore | ||
- name: Build | ||
run: dotnet build -c Release --no-restore | ||
|
||
- name: Docker build | ||
run: docker-compose build | ||
|
||
- name: Docker pull | ||
run: docker-compose pull | ||
|
||
- name: Docker-compose run | ||
run: docker-compose up -d | ||
|
||
- name: Tests | ||
run: dotnet test -c Release --no-build --verbosity normal | ||
|
||
- name: Pack nuget | ||
if: success() | ||
run: | | ||
set +x | ||
NUGET_VERSION=$(git describe --tags --abbrev=1 | sed 's/-/./') | ||
dotnet pack -c Release --no-build -v minimal -o ${{ env.NuGetDirectory }} -p:PackageVersion=$NUGET_VERSION | ||
- name: Publish NuGet package | ||
if: success() && (github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository) | ||
run: dotnet nuget push "${{ env.NuGetDirectory }}/*.nupkg" --api-key "${{ secrets.NUGET_PUSH }}" --source https://api.nuget.org/v3/index.json --skip-duplicate | ||
- name: Upload files to a GitHub release | ||
if: success() && github.ref_type == 'tag' && (github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository) | ||
uses: xresloader/[email protected] | ||
with: | ||
file: ${{ env.NuGetDirectory }}/*.nupkg | ||
tags: true | ||
overwrite: true | ||
tag_name: ${{ github.ref_name }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,37 @@ | ||
{ | ||
// See https://go.microsoft.com/fwlink/?LinkId=733558 | ||
// for the documentation about the tasks.json format | ||
"version": "0.1.0", | ||
"version": "2.0.0", | ||
"command": "dotnet", | ||
"isShellCommand": true, | ||
"args": [], | ||
"tasks": [ | ||
{ | ||
"taskName": "build", | ||
"args": [ "progaudi.tarantool.sln"], | ||
"isBuildCommand": true, | ||
"showOutput": "silent", | ||
"problemMatcher": "$msCompile" | ||
"label": "build", | ||
"type": "shell", | ||
"command": "dotnet", | ||
"args": [ | ||
"build", | ||
"progaudi.tarantool.sln" | ||
], | ||
"problemMatcher": "$msCompile", | ||
"group": { | ||
"_id": "build", | ||
"isDefault": false | ||
} | ||
}, | ||
{ | ||
"taskName": "test", | ||
"args": [ "tests/progaudi.tarantool.tests/progaudi.tarantool.tests.csproj"], | ||
"isTestCommand": true, | ||
"showOutput": "silent", | ||
"problemMatcher": "$msCompile" | ||
"label": "test", | ||
"type": "shell", | ||
"command": "dotnet", | ||
"args": [ | ||
"test", | ||
"tests/progaudi.tarantool.tests/progaudi.tarantool.tests.csproj" | ||
], | ||
"problemMatcher": "$msCompile", | ||
"group": { | ||
"_id": "test", | ||
"isDefault": false | ||
} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<Project> | ||
<PropertyGroup> | ||
<TreatWarningsAsErrors>true</TreatWarningsAsErrors> | ||
<MSBuildTreatWarningsAsErrors>true</MSBuildTreatWarningsAsErrors> | ||
<IsPublishable>false</IsPublishable> | ||
<NoWarn>NETSDK1138</NoWarn> | ||
</PropertyGroup> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<Project> | ||
<PropertyGroup> | ||
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<PackageVersion Include="MsgPack.Light" Version="2.0.1" /> | ||
<PackageVersion Include="System.Net.NameResolution" Version="4.3.0" /> | ||
<PackageVersion Include="System.Threading.Thread" Version="4.3.0" /> | ||
|
||
<!-- benchmark --> | ||
<PackageVersion Include="BenchmarkDotNet" Version="0.10.12" /> | ||
<PackageVersion Include="StackExchange.Redis" Version="1.2.6" /> | ||
|
||
<!-- tests --> | ||
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="15.8.0" /> | ||
<PackageVersion Include="xunit" Version="2.4.0" /> | ||
<PackageVersion Include="xunit.runner.visualstudio" Version="2.4.0" /> | ||
<PackageVersion Include="JetBrains.Annotations" Version="2018.2.1" /> | ||
<PackageVersion Include="Shouldly" Version="3.0.1" /> | ||
</ItemGroup> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
FROM progaudi/tarantool:1.7.5-184-g5be3a82be | ||
|
||
RUN set -x \ | ||
&& mkdir -p /usr/local/share/tarantool | ||
|
||
COPY --chown=tarantool:tarantool *.lua /usr/local/share/tarantool/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
FROM progaudi/tarantool:1.8.2-288-g99128d7d3 | ||
|
||
RUN set -x \ | ||
&& mkdir -p /usr/local/share/tarantool | ||
|
||
COPY --chown=tarantool:tarantool *.lua /usr/local/share/tarantool/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters