Skip to content

更新ci

更新ci #265

Workflow file for this run

name: Build/Test/MirrorToGitee
on:
workflow_dispatch:
push:
branches: [master/snow, dev/snow]
pull_request:
branches: [master/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: git@gitee.com:i66soft/osharp.git
ssh_private_key: ${{ secrets.OSHARP_GITHUB2GITEE }}