-
Notifications
You must be signed in to change notification settings - Fork 26
44 lines (42 loc) · 1.08 KB
/
main.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
43
44
name: Deploy Database
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
Deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v2
- name: Setup .NET Core
uses: actions/setup-dotnet@v1.4.0
with:
dotnet-version: '3.1.100'
- name: Restore dependencies
working-directory: db-deploy
run: dotnet restore
- name: Deploy
working-directory: db-deploy
env:
ConnectionString: ${{ secrets.AZURE_SQL_CONNECTION_STRING }}
run: dotnet run
Test:
runs-on: ubuntu-latest
needs: [Deploy]
steps:
- name: Checkout Repo
uses: actions/checkout@v2
- name: Setup .NET Core
uses: actions/setup-dotnet@v1.4.0
with:
dotnet-version: '3.1.100'
- name: Restore dependencies
working-directory: db-test
run: dotnet restore
- name: Run Tests
working-directory: db-test
env:
ConnectionString: ${{ secrets.AZURE_SQL_CONNECTION_STRING }}
run: dotnet test