-
Notifications
You must be signed in to change notification settings - Fork 20
55 lines (53 loc) · 1.61 KB
/
pr-validation.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
45
46
47
48
49
50
51
52
53
54
55
name: pr-validation
on:
pull_request:
branches:
- main
jobs:
build:
# the build isn't quite Linux-ready
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-dotnet@v2
with:
global-json-file: global.json
- run: |
dotnet build dirs.proj
env:
DOTNET_ROLL_FORWARD: LatestMajor
- uses: actions/upload-artifact@v3
with:
name: tests
path: target\distrib\Debug\netcoreapp3.1
test:
runs-on: ubuntu-latest
needs: build
strategy:
matrix:
sqlImage: ['2017','2019']
steps:
- uses: actions/checkout@v2
- name: Download build files
uses: actions/download-artifact@v3
with:
name: tests
path: tests
- name: Copy toolsconnectioninfo
run: cp .github/workflows/ToolsConnectionInfo.xml ./tests
- name: Install SQL Server
run: |
export SAPASSWORD=$(date +%s|sha256sum|base64|head -c 32)
echo "SAPASSWORD=$SAPASSWORD" >> $GITHUB_ENV
docker run -m 2GB -e ACCEPT_EULA=1 -d --name sql -p:1433:1433 -e SA_PASSWORD=$SAPASSWORD mcr.microsoft.com/mssql/server:${{ matrix.sqlImage }}-latest
sleep 10
- name: Run tests against Linux SQL
run: dotnet test tests/Microsoft.SqlServer.Test.Smo.dll --logger "trx;LogFilePrefix=SmoTests" --filter "TestCategory!=Staging&TestCategory!=Legacy"
env:
DOTNET_ROLL_FORWARD: LatestMajor
- name: Upload test results
uses: actions/upload-artifact@v3
with:
name: test-results-${{ matrix.sqlImage }}
path: TestResults
if: ${{ always() }}