chore: add pull request workflow (#1)

* chore: add pull_request workflow

* chore: add license
This commit is contained in:
Stevan Freeborn
2024-04-08 23:24:49 -05:00
committed by GitHub
parent c7c24965b3
commit 5ccb9848ed
2 changed files with 59 additions and 0 deletions
+38
View File
@@ -0,0 +1,38 @@
name: Pull Request
on:
pull_request:
branches:
- main
paths-ignore:
- '.github/**'
- '.vscode/**'
- '.gitignore'
- '.editorconfig'
- 'LICENSE.md'
- 'docker-compose.dev.yml'
- '**/*/README.md'
- '**/*/Dockerfile'
jobs:
run_tests:
name: Run tests
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- name: Install report generator
run: dotnet tool install --global dotnet-reportgenerator-globaltool
- name: Restore dependencies
run: dotnet restore
- name: Build project
run: dotnet build --no-restore
- name: Test project
run: dotnet test -e DOTNET_ENVIRONMENT=CI --no-build --verbosity normal
- name: Upload test results
uses: actions/upload-artifact@v4
with:
name: test-results
path: ./test/Blog.Tests/TestResults