-
Notifications
You must be signed in to change notification settings - Fork 752
84 lines (82 loc) · 3.78 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
name: Build/Test/MirrorToGitee
on:
workflow_dispatch:
push:
branches: [releases/snow, dev/snow]
pull_request:
branches: [releases/snow]
jobs:
build-on-dotnetcore:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Setup dotnet6.0
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.x
- name: Setup dotnet7.0
uses: actions/setup-dotnet@v1
with:
dotnet-version: 7.0.x
- name: Linux Build
run: |
dotnet build ./src/OSharp.Utils/OSharp.Utils.csproj
dotnet build ./src/OSharp/OSharp.csproj
dotnet build ./src/OSharp.AspNetCore/OSharp.AspNetCore.csproj
dotnet build ./src/OSharp.Authorization.Datas/OSharp.Authorization.Datas.csproj
dotnet build ./src/OSharp.Authorization.Functions/OSharp.Authorization.Functions.csproj
dotnet build ./src/OSharp.AutoMapper/OSharp.AutoMapper.csproj
dotnet build ./src/OSharp.EntityFrameworkCore/OSharp.EntityFrameworkCore.csproj
dotnet build ./src/OSharp.EntityFrameworkCore.MySql/OSharp.EntityFrameworkCore.MySql.csproj
dotnet build ./src/OSharp.EntityFrameworkCore.Oracle/OSharp.EntityFrameworkCore.Oracle.csproj
dotnet build ./src/OSharp.EntityFrameworkCore.PostgreSql/OSharp.EntityFrameworkCore.PostgreSql.csproj
dotnet build ./src/OSharp.EntityFrameworkCore.Sqlite/OSharp.EntityFrameworkCore.Sqlite.csproj
dotnet build ./src/OSharp.EntityFrameworkCore.SqlServer/OSharp.EntityFrameworkCore.SqlServer.csproj
dotnet build ./src/OSharp.Exceptionless/OSharp.Exceptionless.csproj
dotnet build ./src/OSharp.Hangfire/OSharp.Hangfire.csproj
dotnet build ./src/OSharp.Identity/OSharp.Identity.csproj
dotnet build ./src/OSharp.Log4Net/OSharp.Log4Net.csproj
dotnet build ./src/OSharp.MiniProfiler/OSharp.MiniProfiler.csproj
dotnet build ./src/OSharp.NLog/OSharp.NLog.csproj
dotnet build ./src/OSharp.Redis/OSharp.Redis.csproj
dotnet build ./src/OSharp.Swagger/OSharp.Swagger.csproj
dotnet build ./src/OSharp.Hosting.Core/OSharp.Hosting.Core.csproj
dotnet build ./src/OSharp.Hosting.EntityConfiguration/OSharp.Hosting.EntityConfiguration.csproj
dotnet build ./src/OSharp.Hosting.Apis/OSharp.Hosting.Apis.csproj
build-on-desktop:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- name: Setup dotnet6.0
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.x
- name: Setup dotnet7.0
uses: actions/setup-dotnet@v1
with:
dotnet-version: 7.0.x
- name: Windows Build
run: |
dotnet build ./src/OSharp.Wpf/OSharp.Wpf.csproj
dotnet build ./samples/wpf/OSharp.CodeGeneration/OSharp.CodeGeneration.csproj
dotnet build ./samples/wpf/OSharp.CodeGenerator/OSharp.CodeGenerator.csproj
- name: Windows Test
run: |
dotnet test --verbosity normal ./tests/OSharp.Tests/OSharp.Tests.csproj
dotnet test --verbosity normal ./tests/OSharp.AspNetCore.Tests/OSharp.AspNetCore.Tests.csproj
dotnet test --verbosity normal ./tests/OSharp.AutoMapper.Tests/OSharp.AutoMapper.Tests.csproj
dotnet test --verbosity normal ./tests/Liuliu.Demo.Core.Tests/Liuliu.Demo.Core.Tests.csproj
mirror_to_gitee:
needs: [build-on-dotnetcore, build-on-desktop]
runs-on: ubuntu-latest
steps:
- name: "Checkout"
uses: actions/checkout@v1
- name: "Mirror to gitee"
uses: pixta-dev/repository-mirroring-action@v1
with:
target_repo_url: [email protected]:i66soft/osharp.git
ssh_private_key: ${{ secrets.OSHARP_GITHUB2GITEE }}