Skip to content

Commit 150e478

Browse files
committed
move build to github
1 parent 1db38b4 commit 150e478

File tree

16 files changed

+181
-68
lines changed

16 files changed

+181
-68
lines changed

.editorconfig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# EditorConfig is awesome: https://EditorConfig.org
1+
# EditorConfig: https://EditorConfig.org
22

33
root = true
44

@@ -11,7 +11,7 @@ insert_final_newline = true
1111
trim_trailing_whitespace = true
1212

1313
# XML Configuration Files
14-
[*.{xml,config,props,targets,nuspec,resx,ruleset,vsixmanifest,vsct}]
14+
[*.{xml,config,props,targets,nuspec,resx,ruleset,vsixmanifest,vsct,refactorlog,runsettings}]
1515
indent_size = 2
1616

1717
# JSON Files

.github/dependabot.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,3 @@ updates:
66
interval: daily
77
time: "11:00"
88
open-pull-requests-limit: 10
9-
ignore:

.github/workflows/dotnet.yml

Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
name: Build
2+
3+
env:
4+
DOTNET_NOLOGO: true
5+
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
6+
BUILD_PATH: '${{github.workspace}}/artifacts'
7+
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
8+
9+
on:
10+
push:
11+
branches:
12+
- master
13+
- develop
14+
tags:
15+
- 'v*'
16+
pull_request:
17+
branches:
18+
- master
19+
- develop
20+
21+
jobs:
22+
23+
build:
24+
runs-on: ubuntu-latest
25+
26+
services:
27+
mssql:
28+
image: mcr.microsoft.com/mssql/server:2019-latest
29+
env:
30+
MSSQL_SA_PASSWORD: '!P@ssw0rd'
31+
ACCEPT_EULA: 'Y'
32+
ports:
33+
- 1433:1433
34+
volumes:
35+
- mssql_data:/var/opt/mssql
36+
37+
steps:
38+
- name: Checkout
39+
uses: actions/checkout@v3
40+
with:
41+
fetch-depth: 0
42+
43+
- name: Install .NET Core
44+
uses: actions/setup-dotnet@v3
45+
with:
46+
dotnet-version: |
47+
6.0.x
48+
7.0.x
49+
50+
- name: Restore Dependencies
51+
run: dotnet restore
52+
53+
- name: Build Solution
54+
run: dotnet build --no-restore --configuration Release
55+
56+
- name: Run Test
57+
run: dotnet test --configuration Release --collect:"XPlat Code Coverage" --settings coverlet.runsettings
58+
59+
- name: Generate Coverage
60+
uses: danielpalme/[email protected]
61+
with:
62+
reports: '${{github.workspace}}/test/*/TestResults/*/coverage.info'
63+
targetdir: ${{env.BUILD_PATH}}
64+
reporttypes: lcov
65+
66+
- name: Report Coverage
67+
if: success()
68+
uses: coverallsapp/github-action@v2
69+
with:
70+
file: artifacts/lcov.info
71+
format: lcov
72+
73+
- name: Create Packages
74+
if: success() && github.event_name != 'pull_request'
75+
run: dotnet pack --configuration Release --include-symbols --include-source --no-build --no-restore --output "${{env.BUILD_PATH}}"
76+
77+
- name: Upload Packages
78+
if: success() && github.event_name != 'pull_request'
79+
uses: actions/upload-artifact@v3
80+
with:
81+
name: packages
82+
path: '${{env.BUILD_PATH}}'
83+
84+
deploy:
85+
runs-on: ubuntu-latest
86+
needs: build
87+
if: success() && github.event_name != 'pull_request' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/v'))
88+
89+
steps:
90+
- name: Download Artifact
91+
uses: actions/download-artifact@v3
92+
with:
93+
name: packages
94+
95+
- name: Publish Packages GitHub
96+
run: |
97+
for package in $(find -name "*.nupkg"); do
98+
echo "${0##*/}": Pushing $package...
99+
dotnet nuget push $package --source https://nuget.pkg.github.com/loresoft/index.json --api-key ${{ secrets.GITHUB_TOKEN }} --skip-duplicate
100+
done
101+
102+
- name: Publish Packages feedz
103+
run: |
104+
for package in $(find -name "*.nupkg"); do
105+
echo "${0##*/}": Pushing $package...
106+
dotnet nuget push $package --source https://f.feedz.io/loresoft/open/nuget/index.json --api-key ${{ secrets.FEEDDZ_KEY }} --skip-duplicate
107+
done
108+
109+
- name: Publish Packages Nuget
110+
if: startsWith(github.ref, 'refs/tags/v')
111+
run: |
112+
for package in $(find -name "*.nupkg"); do
113+
echo "${0##*/}": Pushing $package...
114+
dotnet nuget push $package --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.NUGET_KEY }} --skip-duplicate
115+
done
116+

EntityFrameworkCore.Generator.sln

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EntityFrameworkCore.Generat
1313
EndProject
1414
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Build", "Build", "{6A18343D-8DEC-4FCC-861E-FA8312E25153}"
1515
ProjectSection(SolutionItems) = preProject
16-
appveyor.yml = appveyor.yml
1716
src\Directory.Build.props = src\Directory.Build.props
17+
.github\workflows\dotnet.yml = .github\workflows\dotnet.yml
1818
README.md = README.md
1919
EndProjectSection
2020
EndProject

appveyor.yml

Lines changed: 0 additions & 34 deletions
This file was deleted.

coverlet.runsettings

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?xml version="1.0" encoding="utf-8" ?>
2+
<RunSettings>
3+
<DataCollectionRunSettings>
4+
<DataCollectors>
5+
<DataCollector friendlyName="XPlat code coverage">
6+
<Configuration>
7+
<Format>lcov</Format>
8+
<ExcludeByAttribute>Obsolete,GeneratedCodeAttribute,CompilerGeneratedAttribute,TestSDKAutoGeneratedCode</ExcludeByAttribute>
9+
<SkipAutoProps>true</SkipAutoProps>
10+
</Configuration>
11+
</DataCollector>
12+
</DataCollectors>
13+
</DataCollectionRunSettings>
14+
</RunSettings>

sample/Tracker/Tracker.Core/Tracker.Core.csproj

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,13 @@
33
<PropertyGroup>
44
<TargetFramework>net6.0</TargetFramework>
55
<Nullable>enable</Nullable>
6+
<IsPackable>false</IsPackable>
67
</PropertyGroup>
78

89
<ItemGroup>
910
<PackageReference Include="AutoMapper" Version="12.0.1" />
10-
<PackageReference Include="FluentValidation" Version="11.5.2" />
11-
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="7.0.5" />
11+
<PackageReference Include="FluentValidation" Version="11.6.0" />
12+
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="7.0.9" />
1213
</ItemGroup>
1314

1415
<ItemGroup>

sample/Tracker/Tracker.Database/Tracker.Database.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
55
<TargetFramework>net6.0</TargetFramework>
6+
<IsPackable>false</IsPackable>
67
</PropertyGroup>
78

89
<ItemGroup>

sample/Tracker/Tracker.Scaffold/Tracker.Scaffold.csproj

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,15 @@
44
<TargetFramework>net7.0</TargetFramework>
55
<ImplicitUsings>enable</ImplicitUsings>
66
<Nullable>enable</Nullable>
7+
<IsPackable>false</IsPackable>
78
</PropertyGroup>
89

910
<ItemGroup>
10-
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="7.0.5">
11+
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="7.0.9">
1112
<PrivateAssets>all</PrivateAssets>
1213
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
1314
</PackageReference>
14-
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="7.0.5" />
15+
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="7.0.9" />
1516
</ItemGroup>
1617

1718
</Project>

sample/Tracker/Tracker.Web/Tracker.Web.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
<PropertyGroup>
44
<TargetFramework>net6.0</TargetFramework>
55
<UserSecretsId>984ef0cf-2b22-4fd1-876d-e01499da4c1f</UserSecretsId>
6+
<IsPackable>false</IsPackable>
67
</PropertyGroup>
78

89
<ItemGroup>

0 commit comments

Comments
 (0)