-
-
Notifications
You must be signed in to change notification settings - Fork 688
27 lines (25 loc) · 925 Bytes
/
dotnet-core.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
name: .NET Core
on: [push]
jobs:
build_docker_image:
env:
PersistenceModule__DefaultConnection: Server=localhost;User Id=sa;Password=<YourStrong!Passw0rd>;Database=Accounts;
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-dotnet@v3
with:
dotnet-version: '6.0.x'
include-prerelease: true
- name: Setup Database then Run Tests
run: |
dotnet --version
docker pull mcr.microsoft.com/mssql/server:2019-latest
docker run -e 'ACCEPT_EULA=Y' -e 'SA_PASSWORD=<YourStrong!Passw0rd>' -p 1433:1433 --name sql1 -d mcr.microsoft.com/mssql/server:2019-latest
sleep 10
dotnet build
pushd accounts-api
dotnet tool update --global dotnet-ef
dotnet ef database update --project src/Infrastructure --startup-project src/WebApi
popd
dotnet test