Skip to content

Configure parts of the config to reload #23

Configure parts of the config to reload

Configure parts of the config to reload #23

name: Run Unit Tests
permissions: {}
on:
push:
branches:
- main
paths:
- 'MustMail.App/**'
- 'MustMail.Migrations.AzureSql/**'
- 'MustMail.Migrations.MySql/**'
- 'MustMail.Migrations.PostgreSql/**'
- 'MustMail.Migrations.SQLite/**'
- 'MustMail.Migrations.SqlServer/**'
- 'MustMail.Tests/**'
jobs:
test:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
with:
ref: main
persist-credentials: false
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 10
- name: Load test environment variables
run: |
echo "${{ secrets.TEST_ENV_VARS }}" >> $GITHUB_ENV
- name: Allow binding to privileged ports
run: sudo setcap 'cap_net_bind_service=+ep' $(which dotnet)
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore --configuration Release
- name: Run tests
run: dotnet test
working-directory: ./MustMail.Tests