Skip to content

Commit 9447233

Browse files
feat: add GitHub Actions workflow for building backend and frontend projects
1 parent e018317 commit 9447233

File tree

2 files changed

+33
-0
lines changed

2 files changed

+33
-0
lines changed

.github/workflows/build.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Build Backend and Frontend
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
12+
strategy:
13+
matrix:
14+
project:
15+
- SampleApp/BackEnd/BackEnd.csproj
16+
- SampleApp/FrontEnd/FrontEnd.csproj
17+
18+
steps:
19+
- name: Checkout repository
20+
uses: actions/checkout@v2
21+
22+
- name: Setup .NET
23+
uses: actions/setup-dotnet@v2
24+
with:
25+
dotnet-version: '9.0.x'
26+
27+
- name: Restore dependencies
28+
run: dotnet restore ${{ matrix.project }}
29+
30+
- name: Build project
31+
run: dotnet build ${{ matrix.project }} --no-restore --configuration Release

SampleApp/BackEnd/Program.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
// Learn more about configuring OpenAPI at https://aka.ms/aspnet/openapi
88
builder.Services.AddOpenApi(options =>
99
{
10+
// current workaround for port forwarding in codespaces
11+
// https://github.com/dotnet/aspnetcore/issues/57332
1012
options.AddDocumentTransformer((document, context, ct) =>
1113
{
1214
document.Servers = [];

0 commit comments

Comments
 (0)