Feature/iracing league sync #543
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |