Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
57 changes: 57 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Build

on:
push:
branches:
- master
pull_request:
branches:
- master
workflow_dispatch:

env:
DOTNET_NOLOGO: true
DOTNET_CLI_TELEMETRY_OPTOUT: true
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true

jobs:
build:
name: Build and test
runs-on: windows-latest

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
10.0.x

- name: Restore
run: dotnet restore src/AspNetCoreTemplate.sln

- name: Build
run: dotnet build src/AspNetCoreTemplate.sln -c Release --no-restore

# AspNetCoreTemplate.Web.Tests is excluded: its two example tests boot the
# whole app through WebApplicationFactory, which connects to SQL Server.
# Run them locally against a database.
- name: Test
run: >
dotnet test src/Tests/AspNetCoreTemplate.Services.Data.Tests/AspNetCoreTemplate.Services.Data.Tests.csproj
-c Release --no-build --logger "trx;LogFileName=test-results.trx"

# The renamer tool has its own solution and still targets net6.0; the
# current SDK builds it from the NuGet targeting pack.
- name: Build the template renamer
run: dotnet build tools/TemplateRenamer/TemplateRenamer.sln -c Release

- name: Upload test results
if: always()
uses: actions/upload-artifact@v4
with:
name: test-results
path: '**/TestResults/*.trx'
if-no-files-found: ignore
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ A ready-to-use template for ASP.NET Core with repositories, services, models map

## Build status

[![Build Status](https://nikolayit.visualstudio.com/AspNetCoreTemplate/_apis/build/status/NikolayIT.ASP.NET-Core-Template?branchName=master)](https://nikolayit.visualstudio.com/AspNetCoreTemplate/_build/latest?definitionId=15&branchName=master)
[![Build](https://github.com/NikolayIT/ASP.NET-Core-Template/actions/workflows/build.yml/badge.svg?branch=master)](https://github.com/NikolayIT/ASP.NET-Core-Template/actions/workflows/build.yml)

## Authors

Expand Down
34 changes: 0 additions & 34 deletions azure-pipelines.yml

This file was deleted.

Loading