This commit is contained in:
Kirill Osenkov 2021-04-17 18:52:38 -07:00
Родитель 3ce2684187 1b9e327909
Коммит 75dd827b8c
5 изменённых файлов: 50 добавлений и 30 удалений

42
.github/workflows/main.yml поставляемый Normal file
Просмотреть файл

@ -0,0 +1,42 @@
name: Build
on: [push, pull_request]
jobs:
build:
strategy:
matrix:
os: [ ubuntu-latest, windows-latest ]
config: [ Debug ]
fail-fast: false
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0 # GitVersioning needs deep clone
submodules: recursive
- uses: actions/setup-dotnet@v1
with:
dotnet-version: '5.0.x'
- name: Set up NuGet
uses: nuget/setup-nuget@v1
- name: Restore
run: dotnet restore MonoDevelop.Xml.sln
- name: Build
run: dotnet build MonoDevelop.Xml.sln -c ${{ matrix.config }} --no-restore
- name: Test (Windows)
if: startsWith (matrix.os, 'windows')
run: dotnet test -c ${{ matrix.config }} --no-build
- name: Test (Linux/Mac)
if: startsWith (matrix.os, 'windows') == false
# dotnet test doesn't support mono so we have to use the nunit runner
run: |
nuget install NUnit.ConsoleRunner -Version 3.11.1 -OutputDirectory testrunner
mono ./testrunner/NUnit.ConsoleRunner.3.11.1/tools/nunit3-console.exe ./Tests/bin/${{ matrix.config }}/MonoDevelop.Xml.Tests.dll

Просмотреть файл

@ -1,9 +0,0 @@
language: csharp
mono: latest
dotnet: 2.2.401
install:
- msbuild -t:Restore -p:Configuration=Release
- nuget install NUnit.ConsoleRunner -Version 3.8.0 -OutputDirectory testrunner
script:
- msbuild MonoDevelop.Xml.sln -p:Configuration=Release
- mono ./testrunner/NUnit.ConsoleRunner.3.8.0/tools/nunit3-console.exe ./Tests/bin/Release/MonoDevelop.Xml.Tests.dll

Просмотреть файл

@ -19,10 +19,10 @@
<ItemGroup>
<ProjectReference Include="..\Core\MonoDevelop.Xml.Core.csproj" />
<PackageReference Include="Microsoft.VisualStudio.ImageCatalog" Version="16.7.30328.74" ExcludeAssets="runtime" />
<PackageReference Include="Microsoft.VisualStudio.Language.Intellisense" Version="16.8.239" ExcludeAssets="runtime" />
<PackageReference Include="Microsoft.VisualStudio.Language.StandardClassification" Version="16.8.239" ExcludeAssets="runtime" />
<PackageReference Include="Microsoft.VisualStudio.Threading" Version="16.8.55" ExcludeAssets="runtime" />
<PackageReference Include="Microsoft.VisualStudio.ImageCatalog" Version="16.9.31023.347" ExcludeAssets="runtime" />
<PackageReference Include="Microsoft.VisualStudio.Language.Intellisense" Version="16.9.227" ExcludeAssets="runtime" />
<PackageReference Include="Microsoft.VisualStudio.Language.StandardClassification" Version="16.9.227" ExcludeAssets="runtime" />
<PackageReference Include="Microsoft.VisualStudio.Threading" Version="16.9.60" ExcludeAssets="runtime" />
</ItemGroup>
<ItemGroup>

Просмотреть файл

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<add key="vssdk" value="https://pkgs.dev.azure.com/azure-public/vside/_packaging/vssdk/nuget/v3/index.json" />
</packageSources>
</configuration>
<packageSources>
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
</packageSources>
</configuration>

Просмотреть файл

@ -1,13 +0,0 @@
version: 0.1.{build}
pull_requests:
do_not_increment_build_number: true
image: Visual Studio 2019
install:
- cd %APPVEYOR_BUILD_FOLDER%
- git submodule update --init --recursive
before_build:
- cmd: msbuild /t:Restore
build:
project: MonoDevelop.Xml.sln
parallel: true
verbosity: minimal