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

Feature/migrate to GitHub actions #113

Merged
merged 72 commits into from
Oct 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
72 commits
Select commit Hold shift + click to select a range
68c5844
Migrate to github actions
ZEXSM Apr 9, 2023
4a8121a
fix
ZEXSM Apr 9, 2023
2b3bf18
fix 1
ZEXSM Apr 9, 2023
6fd58eb
Update ci-cd.yml
ZEXSM Apr 9, 2023
a9d651f
Update ci-cd.yml
ZEXSM Apr 9, 2023
50794d0
Update ci-cd.yml
ZEXSM Apr 9, 2023
b067910
Update ci-cd.yml
ZEXSM Apr 9, 2023
6c59bb5
test
ZEXSM Apr 9, 2023
0426fb1
test 1
ZEXSM Apr 9, 2023
dde87f5
test 2
ZEXSM Apr 9, 2023
0b48374
fix
ZEXSM Apr 9, 2023
8de2889
remove travis
ZEXSM Apr 9, 2023
5b1c4f6
fix
ZEXSM Apr 9, 2023
d9d064a
fix test
ZEXSM Apr 9, 2023
a61dcae
fix
ZEXSM Apr 9, 2023
45af328
GITHUB_ACTION
ZEXSM Apr 9, 2023
8edb0da
test
ZEXSM Apr 9, 2023
c26c4f9
pack test 1
ZEXSM Apr 10, 2023
68a88ff
test create tag
ZEXSM Apr 10, 2023
27b2a2e
test
ZEXSM Apr 10, 2023
2b8b9f7
test 1
ZEXSM Apr 10, 2023
b4152ad
tests release
ZEXSM Apr 11, 2023
cb382e5
test release 1
ZEXSM Apr 11, 2023
065ecb8
test release 2
ZEXSM Apr 11, 2023
c0f1257
test feature
ZEXSM Apr 11, 2023
4779ac3
fix pack
ZEXSM Apr 11, 2023
5166592
test deploy
ZEXSM Apr 11, 2023
2c75c6e
test
ZEXSM Apr 11, 2023
2f0e433
test 1
ZEXSM Apr 11, 2023
930dc1b
test
ZEXSM Apr 11, 2023
e3d7525
Merge remote-tracking branch 'origin/main' into feature/migrate-to-gi…
ZEXSM Oct 28, 2023
b30285b
test publish package
ZEXSM Oct 28, 2023
72ffa7b
test release by actions
ZEXSM Oct 28, 2023
bfa115f
test publish 1
ZEXSM Oct 28, 2023
569c8a9
test release 2
ZEXSM Oct 28, 2023
6d1d0c7
test release 3
ZEXSM Oct 28, 2023
2a165a6
test release 4
ZEXSM Oct 28, 2023
d9aa128
test release 5
ZEXSM Oct 28, 2023
fbeac85
test release 6
ZEXSM Oct 28, 2023
1d06e8b
test publish 1
ZEXSM Oct 28, 2023
e815bed
test publish 2
ZEXSM Oct 28, 2023
2d82088
test publish 3
ZEXSM Oct 28, 2023
ba3395c
test publish 5
ZEXSM Oct 28, 2023
3e42be3
test publish 7
ZEXSM Oct 28, 2023
f9f693e
publish test 1
ZEXSM Oct 28, 2023
8b875fc
publish test 2
ZEXSM Oct 29, 2023
f4d4754
publish test 3
ZEXSM Oct 29, 2023
5af913f
publish test final
ZEXSM Oct 29, 2023
7fd7052
test cover 1
ZEXSM Oct 29, 2023
be10625
test cover 2
ZEXSM Oct 29, 2023
75b7060
test cover 3
ZEXSM Oct 29, 2023
5530dfd
test cover 4
ZEXSM Oct 29, 2023
5553e0a
test cover 5
ZEXSM Oct 29, 2023
2c78e5a
test cover 6
ZEXSM Oct 29, 2023
176f4aa
test cover 7
ZEXSM Oct 29, 2023
1bd666f
test cover 8
ZEXSM Oct 29, 2023
8f9e9f3
test cover 9
ZEXSM Oct 29, 2023
e0e8af3
test cover 10
ZEXSM Oct 29, 2023
f4087db
test publish 11
ZEXSM Oct 29, 2023
bb4b7d5
test cover 12
ZEXSM Oct 29, 2023
73e3c0f
test cover 13
ZEXSM Oct 29, 2023
959dfdc
test cover 13
ZEXSM Oct 29, 2023
737917e
test cover 13
ZEXSM Oct 29, 2023
d417369
test cover 14
ZEXSM Oct 29, 2023
1931cc6
test cover 15
ZEXSM Oct 29, 2023
73c6589
fix
ZEXSM Oct 29, 2023
cc856a8
text cover 16
ZEXSM Oct 29, 2023
c5656ba
test cover 3
ZEXSM Oct 29, 2023
440d2a5
test cover 3
ZEXSM Oct 29, 2023
4ee0da7
test cover final
ZEXSM Oct 29, 2023
11b232d
fix
ZEXSM Oct 29, 2023
4cf18af
test
ZEXSM Oct 29, 2023
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
75 changes: 75 additions & 0 deletions .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
name: OData.QueryBuilder ci\cd
on:
push:
branches:
- main
pull_request:
env:
DOTNET_VERSION: '3.1.x'
jobs:
ci:
name: build&test&coverage(${{matrix.os}})
runs-on: ${{ matrix.os }}
environment: ci
strategy:
matrix:
os: [ubuntu-latest]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup .NET SDK ${{ matrix.dotnet-version }}
uses: actions/setup-dotnet@v3
with:
dotnet-version: ${{ env.DOTNET_VERSION }}
- name: Build
run: dotnet build -c ${{ vars.CONFIGURATION }}
- name: Test
run: dotnet test -c ${{ vars.CONFIGURATION }} --no-build
- name: Coveralls
run: |
dotnet minicover instrument
dotnet minicover reset
dotnet test -c ${{ vars.CONFIGURATION }} --no-build
dotnet minicover uninstrument
dotnet minicover report
dotnet minicover coverallsreport --service-name "github" \
--service-job-id ${{ github.run_id }} \
--repo-token ${{ secrets.COVERALLS_REPO_TOKEN }} \
--branch ${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}} \
--commit ${{ github.sha }}
cd:
needs: ci
if: github.ref == 'refs/heads/main'
name: publish&release
runs-on: ubuntu-latest
environment: cd
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Create tag
id: create_tag
run: |
git fetch --tags --force &> /dev/null
PR_TITLE=$(git log -1 --pretty='%f')
LAST_TAG=$(echo $(git describe --tags $(git rev-list --tags --max-count=1)) | cut -d'v' -f 2)
CURRENT_MAJOR=$(echo $LAST_TAG | cut -d. -f 1)
CURRENT_MINOR=$(echo $LAST_TAG | cut -d. -f 2)
CURRENT_PATCH=$(echo $(echo $LAST_TAG | cut -d. -f 3) | cut -d- -f 1)
RC=$(echo $(echo $LAST_TAG | cut -d. -f 3) | cut -d- -f 2)
MAJOR=$(([ "$RC" == "rc" ] && echo $CURRENT_MAJOR) || ([ "$(echo $PR_TITLE | grep -oP 'release')" == "release" ] && echo $(($CURRENT_MAJOR+1))) || echo $CURRENT_MAJOR)
MINOR=$(([ "$RC" == "rc" ] && echo $CURRENT_MINOR) || ([ "$(echo $PR_TITLE | grep -oP 'release')" == "release" ] && echo 0) || ([ "$(echo $PR_TITLE | grep -oP 'feature')" == "feature" ] && echo $(($CURRENT_MINOR+1))) || echo $CURRENT_MINOR)
PATCH=$(([ "$RC" == "rc" ] && echo $CURRENT_PATCH) || ([ "$(echo $PR_TITLE | grep -oP 'release')" == "release" ] && echo 0) || ([ "$(echo $PR_TITLE | grep -oP 'feature')" == "feature" ] && echo 0) || echo $(($CURRENT_PATCH+1)))
NEW_TAG=$(echo $MAJOR.$MINOR.$PATCH)
PACKAGE_VERSION=${NEW_TAG:-${{ vars.DEFAULT_PACKAGE_VERSION }}}
echo "release_package_version=$PACKAGE_VERSION" >> "$GITHUB_OUTPUT"
echo $PACKAGE_VERSION
- name: Pack
run: dotnet pack -c ${{ vars.CONFIGURATION }} -p:PackageVersion=${{ steps.create_tag.outputs.release_package_version }}
- name: Release
env:
GH_TOKEN: ${{ secrets.ACCSESS_TOKEN }}
run: |
dotnet nuget push ./src/OData.QueryBuilder/bin/Release/OData.QueryBuilder.${{ steps.create_tag.outputs.release_package_version }}.nupkg -k ${{ secrets.NUGET_API_KEY }} -s ${{ vars.NUGET_SOURCE }}
git tag v${{ steps.create_tag.outputs.release_package_version }}
git push origin v${{ steps.create_tag.outputs.release_package_version }}
gh release create v${{ steps.create_tag.outputs.release_package_version }} --generate-notes
44 changes: 0 additions & 44 deletions .travis.yml

This file was deleted.

10 changes: 9 additions & 1 deletion OData.QueryBuilder.sln
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "items", "items", "{179F88B9-A06D-4505-9266-A5D66004601C}"
ProjectSection(SolutionItems) = preProject
.gitignore = .gitignore
.travis.yml = .travis.yml
README.md = README.md
EndProjectSection
EndProject
Expand All @@ -27,6 +26,13 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OData.QueryBuilder.Benchmar
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OData.QueryBuilder.Fakes", "test\OData.QueryBuilder.Fakes\OData.QueryBuilder.Fakes.csproj", "{421FF96A-2F4E-4589-AF2A-604FDC8BE2AC}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "github", "github", "{C1D8FFE9-07E2-4EA7-AF59-C5A68F7DB89C}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "workflows", "workflows", "{D95B88FB-7257-421E-8AA3-BD85C63ECBE6}"
ProjectSection(SolutionItems) = preProject
.github\workflows\ci-cd.yml = .github\workflows\ci-cd.yml
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -59,6 +65,8 @@ Global
{B8F31CF9-EDE2-4813-A9AC-EBF3514FFE82} = {179F88B9-A06D-4505-9266-A5D66004601C}
{3C66CF4E-8FA0-4E81-90DB-B22234A2670C} = {26982440-340F-48A2-9D73-44DB6C52EBF1}
{421FF96A-2F4E-4589-AF2A-604FDC8BE2AC} = {26982440-340F-48A2-9D73-44DB6C52EBF1}
{C1D8FFE9-07E2-4EA7-AF59-C5A68F7DB89C} = {179F88B9-A06D-4505-9266-A5D66004601C}
{D95B88FB-7257-421E-8AA3-BD85C63ECBE6} = {C1D8FFE9-07E2-4EA7-AF59-C5A68F7DB89C}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {1D51B9A3-94B0-48DF-BFF5-110B13303535}
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Library for creating complex OData queries (OData version 4.01) based on data models with linq syntax.

[![Build Status](https://travis-ci.com/ZEXSM/OData.QueryBuilder.svg?branch=main)](https://travis-ci.com/ZEXSM/OData.QueryBuilder)
[![Coverage Status](https://coveralls.io/repos/github/ZEXSM/OData.QueryBuilder/badge.svg?branch=master)](https://coveralls.io/github/ZEXSM/OData.QueryBuilder?branch=master)
[![Coverage Status](https://coveralls.io/repos/github/ZEXSM/OData.QueryBuilder/badge.svg?branch=master)](https://coveralls.io/github/ZEXSM/OData.QueryBuilder?branch=main)
[![Nuget Status](https://img.shields.io/nuget/dt/OData.QueryBuilder.svg)](https://www.nuget.org/packages/OData.QueryBuilder)

## Benefits
Expand Down
2 changes: 1 addition & 1 deletion src/OData.QueryBuilder/OData.QueryBuilder.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<TargetFramework>netstandard2.0</TargetFramework>
<PackageId>OData.QueryBuilder</PackageId>
<PackageId>DotNetToolTest</PackageId>
<PackageVersion>$(PackageVersion)</PackageVersion>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp3.1</TargetFramework>
</PropertyGroup>
<PropertyGroup>
<OutputType>Exe</OutputType>
<IsPackable>false</IsPackable>
<TargetFramework>netcoreapp3.1</TargetFramework>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="BenchmarkDotNet" Version="0.12.1" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="BenchmarkDotNet" Version="0.12.1" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\src\OData.QueryBuilder\OData.QueryBuilder.csproj" />
<ProjectReference Include="..\OData.QueryBuilder.Fakes\OData.QueryBuilder.Fakes.csproj" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\OData.QueryBuilder\OData.QueryBuilder.csproj" />
<ProjectReference Include="..\OData.QueryBuilder.Fakes\OData.QueryBuilder.Fakes.csproj" />
</ItemGroup>

</Project>
7 changes: 4 additions & 3 deletions test/OData.QueryBuilder.Fakes/OData.QueryBuilder.Fakes.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
</PropertyGroup>
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<IsPackable>false</IsPackable>
</PropertyGroup>

</Project>
28 changes: 14 additions & 14 deletions test/OData.QueryBuilder.Test/OData.QueryBuilder.Test.csproj
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<IsPackable>false</IsPackable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="FluentAssertions" Version="5.10.3" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.6.1" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.2" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\OData.QueryBuilder\OData.QueryBuilder.csproj" />
<ProjectReference Include="..\OData.QueryBuilder.Fakes\OData.QueryBuilder.Fakes.csproj" />
</ItemGroup>
<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<IsPackable>false</IsPackable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="FluentAssertions" Version="5.10.3" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.6.1" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.2" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\OData.QueryBuilder\OData.QueryBuilder.csproj" />
<ProjectReference Include="..\OData.QueryBuilder.Fakes\OData.QueryBuilder.Fakes.csproj" />
</ItemGroup>
</Project>
Loading