Skip to content

Merge branch 'master' of https://github.com/Avanade/Beef #10

Merge branch 'master' of https://github.com/Avanade/Beef

Merge branch 'master' of https://github.com/Avanade/Beef #10

Workflow file for this run

# This workflow will build a .NET project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net
name: .NET
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
jobs:
build:
runs-on: ubuntu-latest
services:
sql:
image: mcr.microsoft.com/mssql/server:2019-latest
ports:
- 1433:1433
env:
ACCEPT_EULA: Y
SA_PASSWORD: sAPWD23.^0
options: --name sqlserver
steps:
- uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: |
6.0.x
7.0.x
- name: Restore 'Tools' dependencies
run: |
dotnet restore ./tools/Beef.CodeGen.Core
dotnet restore ./tools/Beef.Database.Core
dotnet restore ./tools/Beef.Database.SqlServer
dotnet restore ./tools/Beef.Database.MySql
dotnet restore ./tools/Beef.Test.NUnit
- name: Build 'Tools' projects
run: |
dotnet build ./tools/Beef.CodeGen.Core --no-restore
dotnet build ./tools/Beef.Database.Core --no-restore
dotnet build ./tools/Beef.Database.SqlServer --no-restore
dotnet build ./tools/Beef.Database.MySql --no-restore
dotnet build ./tools/Beef.Test.NUnit --no-restore
- name: Restore 'Samples/Demo' dependencies
run: |
dotnet restore ./samples/Demo/Beef.Demo.CodeGen
dotnet restore ./samples/Demo/Beef.Demo.Database
dotnet restore ./samples/Demo/Beef.Demo.Common
dotnet restore ./samples/Demo/Beef.Demo.Business
dotnet restore ./samples/Demo/Beef.Demo.Api
dotnet restore ./samples/Demo/Beef.Demo.Abc.Database
dotnet restore ./samples/Demo/Beef.Demo.Test
- name: Build 'Samples/Demo' projects
run: |
dotnet build ./samples/Demo/Beef.Demo.CodeGen --no-restore
dotnet build ./samples/Demo/Beef.Demo.Database --no-restore
dotnet build ./samples/Demo/Beef.Demo.Common --no-restore
dotnet build ./samples/Demo/Beef.Demo.Business --no-restore
dotnet build ./samples/Demo/Beef.Demo.Api --no-restore
dotnet build ./samples/Demo/Beef.Demo.Abc.Database --no-restore
dotnet build ./samples/Demo/Beef.Demo.Test --no-restore
- name: Restore 'Samples/Cdr.Banking' dependencies
run: |
dotnet restore ./samples/Cdr.Banking/Cdr.Banking.CodeGen
dotnet restore ./samples/Cdr.Banking/Cdr.Banking.Common
dotnet restore ./samples/Cdr.Banking/Cdr.Banking.Business
dotnet restore ./samples/Cdr.Banking/Cdr.Banking.Api
dotnet restore ./samples/Cdr.Banking/Cdr.Banking.Test
- name: Build 'Samples/Cdr.Banking' projects
run: |
dotnet build ./samples/Cdr.Banking/Cdr.Banking.CodeGen --no-restore
dotnet build ./samples/Cdr.Banking/Cdr.Banking.Common --no-restore
dotnet build ./samples/Cdr.Banking/Cdr.Banking.Business --no-restore
dotnet build ./samples/Cdr.Banking/Cdr.Banking.Api --no-restore
dotnet build ./samples/Cdr.Banking/Cdr.Banking.Test --no-restore
- name: Restore 'Samples/My.Hr' dependencies
run: |
dotnet restore ./samples/My.Hr/My.Hr.CodeGen
dotnet restore ./samples/My.Hr/My.Hr.Database
dotnet restore ./samples/My.Hr/My.Hr.Common
dotnet restore ./samples/My.Hr/My.Hr.Business
dotnet restore ./samples/My.Hr/My.Hr.Api
dotnet restore ./samples/My.Hr/My.Hr.Test
- name: Build 'Samples/My.Hr' projects
run: |
dotnet build ./samples/My.Hr/My.Hr.CodeGen --no-restore
dotnet build ./samples/My.Hr/My.Hr.Database --no-restore
dotnet build ./samples/My.Hr/My.Hr.Common --no-restore
dotnet build ./samples/My.Hr/My.Hr.Business --no-restore
dotnet build ./samples/My.Hr/My.Hr.Api --no-restore
dotnet build ./samples/My.Hr/My.Hr.Test --no-restore
- name: Restore 'Samples/MyEf.Hr' dependencies
run: |
dotnet restore ./samples/MyEf.Hr/MyEf.Hr.CodeGen
dotnet restore ./samples/MyEf.Hr/MyEf.Hr.Database
dotnet restore ./samples/MyEf.Hr/MyEf.Hr.Common
dotnet restore ./samples/MyEf.Hr/MyEf.Hr.Business
dotnet restore ./samples/MyEf.Hr/MyEf.Hr.Api
dotnet restore ./samples/MyEf.Hr/MyEf.Hr.Test
dotnet restore ./samples/MyEf.Hr/MyEf.Hr.Security.Subscriptions
dotnet restore ./samples/MyEf.Hr/MyEf.Hr.Security.Test
- name: Build 'Samples/MyEf.Hr' projects
run: |
dotnet build ./samples/MyEf.Hr/MyEf.Hr.CodeGen --no-restore
dotnet build ./samples/MyEf.Hr/MyEf.Hr.Database --no-restore
dotnet build ./samples/MyEf.Hr/MyEf.Hr.Common --no-restore
dotnet build ./samples/MyEf.Hr/MyEf.Hr.Business --no-restore
dotnet build ./samples/MyEf.Hr/MyEf.Hr.Api --no-restore
dotnet build ./samples/MyEf.Hr/MyEf.Hr.Test --no-restore
dotnet build ./samples/MyEf.Hr/MyEf.Hr.Security.Subscriptions --no-restore
dotnet build ./samples/MyEf.Hr/MyEf.Hr.Security.Test --no-restore
- name: Set environment variables
run: |
echo "My_Hr_ConnectionStrings__Database=Data Source=localhost,1433;Initial Catalog=My.Hr;User id=sa;Password=sAPWD23.^0;TrustServerCertificate=true" >> $GITHUB_ENV
echo "MyEf_Hr_ConnectionStrings__Database=Data Source=localhost,1433;Initial Catalog=MyEf.Hr;User id=sa;Password=sAPWD23.^0;TrustServerCertificate=true" >> $GITHUB_ENV
- name: Verify 'Samples/MyEf.Hr' database
working-directory: ./samples/MyEf.Hr/MyEf.Hr.Database
run: dotnet run all --connection-varname MyEf_Hr_ConnectionStrings__Database --expect-no-changes
- name: Verify 'Samples/MyEf.Hr' code-gen
working-directory: ./samples/MyEf.Hr/MyEf.Hr.CodeGen
run: dotnet run all --expect-no-changes
- name: Verify 'Samples/MyEf.Hr' testing
run: |
dotnet test ./samples/MyEf.Hr/MyEf.Hr.Test --no-build --verbosity normal
dotnet test ./samples/MyEf.Hr/MyEf.Hr.Security.Test --no-build --verbosity normal