-
Notifications
You must be signed in to change notification settings - Fork 1
42 lines (38 loc) · 1.29 KB
/
dotnet_develop.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
name: .NET
on:
push:
branches: [ develop* ]
pull_request:
branches: [ develop* ]
jobs:
build:
env:
BUILD_CONFIG: Debug
NUGET_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
TEST_USER: root
TEST_PASSWORD: TestPass123
TEST_DATABASE: TestDatabase
DB_TEST_PROJECT: test/DbIntegrationTests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 6.0.x
source-url: https://nuget.pkg.github.com/SSchulze1989/index.json
- name: Setup MySQL
uses: mirromutth/[email protected]
with:
# Required if "mysql user" is empty, default is empty. The root superuser password
mysql root password: $TEST_PASSWORD
# MYSQL_DATABASE - name for the default database that is created
mysql database: $TEST_DATABASE
- name: Set secrets
run: dotnet user-secrets set "ConnectionStrings:ModelDb" "server=localhost;database=$TEST_DATABASE;user=$TEST_USER;password=$TEST_PASSWORD" --project $DB_TEST_PROJECT
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build -c $BUILD_CONFIG --no-restore
- name: Test
run: dotnet test -c $BUILD_CONFIG --no-build --verbosity normal