Skip to content

Commit

Permalink
Run OmniSharpMSBuild.Tests on Mono in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
JoeRobich committed Mar 20, 2022
1 parent 78bdcc4 commit b5d0954
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 64 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/tests-net6.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-18.04, windows-2019, macos-10.15]
os: [ubuntu-20.04, windows-2022, macos-11]
testProjects:
- OmniSharp.MSBuild.Tests,OmniSharp.Roslyn.CSharp.Tests,OmniSharp.Cake.Tests,OmniSharp.Script.Tests,OmniSharp.Stdio.Tests,OmniSharp.Http.Tests,OmniSharp.Tests,OmniSharp.Lsp.Tests
- OmniSharp.DotNetTest.Tests
Expand Down
72 changes: 9 additions & 63 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,9 @@ jobs:
strategy:
fail-fast: false
matrix:
# TODO: mono 6.12 is installed on ubuntu and macos images, but ships with MSBuild 16.6.
# https://github.com/actions/virtual-environments/blob/main/images/linux/Ubuntu1804-README.md
os: [ubuntu-20.04, windows-2022, macos-11]
testProjects:
- OmniSharp.Roslyn.CSharp.Tests,OmniSharp.Cake.Tests,OmniSharp.Script.Tests,OmniSharp.Stdio.Tests,OmniSharp.Http.Tests,OmniSharp.Tests,OmniSharp.Lsp.Tests
- OmniSharp.MSBuild.Tests, OmniSharp.Roslyn.CSharp.Tests,OmniSharp.Cake.Tests,OmniSharp.Script.Tests,OmniSharp.Stdio.Tests,OmniSharp.Http.Tests,OmniSharp.Tests,OmniSharp.Lsp.Tests
- OmniSharp.DotNetTest.Tests
name: 'Test'
steps:
Expand All @@ -39,6 +37,14 @@ jobs:
clean: 'false'
fetch-depth: '0'

# TODO: Need to figure out the correct way to install mono on linux / mac
# Currently the latest image has mono 6.12
# https://github.com/actions/virtual-environments/blob/main/images/linux/Ubuntu1804-README.md
# - name: 🔨 Use Mono ${{ env.MonoVersion }} SDK
# uses: maxim-lobanov/setup-xamarin@v1
# with:
# mono-version: ${{ env.MonoVersion }}

- name: Setup NuGet.exe
uses: nuget/setup-nuget@v1
with:
Expand Down Expand Up @@ -102,63 +108,3 @@ jobs:
with:
name: 'logs - ${{ github.workflow }} ${{ matrix.os }}'
path: '${{ env.Artifacts }}/logs/'

test-msbuild:
# Limit the .NET Framework OmniSharp.MSBuild.Tests to the Windows Platform,
# since we have access to a MSBuild newer than version 16.6.
runs-on: windows-2022
strategy:
fail-fast: false
matrix:
testProjects:
- OmniSharp.MSBuild.Tests
name: 'Test'
steps:
- name: Checkout
uses: actions/checkout@v2
with:
clean: 'false'
fetch-depth: '0'

- name: Setup NuGet.exe
uses: nuget/setup-nuget@v1
with:
nuget-version: ${{ env.NuGetVersion }}

- name: 🔨 Use .NET Core ${{ env.DotNetVersion2 }} SDK
uses: actions/setup-dotnet@v1.7.2
with:
dotnet-version: ${{ env.DotNetVersion2 }}

- name: 🔨 Use .NET Core ${{ env.DotNetVersion }} SDK
uses: actions/setup-dotnet@v1.7.2
with:
dotnet-version: ${{ env.DotNetVersion }}

- name: 🎁 dotnet tool restore
run: |
dotnet tool restore
- name: 🎁 nuget install
run: |
nuget install tools/packages.config -ExcludeVersion -OutputDirectory tools
- name: 🍰 Run Cake
uses: nick-invision/retry@v2
with:
shell: powershell
timeout_minutes: 40
max_attempts: 3
retry_on: error
command: |
.\build.ps1 -configuration Release -verbosity Verbose -target Test --test-project="$ENV:TEST_PROJECT"
env:
TEST_PROJECT: ${{ matrix.testProjects }}

- name: ⬆ Publish Logs
uses: actions/upload-artifact@v2
continue-on-error: true
if: ${{ always() }}
with:
name: 'logs - ${{ github.workflow }} ${{ matrix.os }}'
path: '${{ env.Artifacts }}/logs/'

0 comments on commit b5d0954

Please sign in to comment.