Skip to content

Commit 63b4875

Browse files
authored
Merge pull request #41 from Resellio/actions/test-on-PR
[Actions] Create automatic testing on PR/push
2 parents d2c695e + c5c5ca0 commit 63b4875

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

.github/workflows/dotnettest.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# This workflow will build a .NET project
2+
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net
3+
4+
name: Build and test .NET API
5+
6+
on:
7+
push:
8+
branches: [ "main", "develop" ]
9+
pull_request:
10+
branches: [ "main", "develop" ]
11+
workflow_dispatch:
12+
13+
jobs:
14+
build:
15+
16+
runs-on: ubuntu-latest
17+
18+
steps:
19+
- uses: actions/checkout@v4
20+
- name: Setup .NET
21+
uses: actions/setup-dotnet@v4
22+
with:
23+
dotnet-version: 9.0.x
24+
- name: Restore dependencies
25+
run: dotnet restore TickAPI/TickAPI.sln
26+
- name: Build
27+
run: dotnet build --no-restore TickAPI/TickAPI.sln
28+
- name: Test
29+
run: dotnet test --no-build --verbosity normal TickAPI/TickAPI.sln
30+
env:
31+
ASPNETCORE_ENVIRONMENT: Test

0 commit comments

Comments
 (0)