Sync to 170.23 #34
Workflow file for this run
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: 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() }} |