Combine Windows and Linux CI Workflows (#3786)

This commit is contained in:
Michael Maxwell 2022-11-09 14:48:19 -08:00 committed by GitHub
parent a5e5ed8705
commit 724294d00f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 18 additions and 39 deletions

View File

@ -5,7 +5,7 @@
# IMPORTANT: This workflow MUST use the same 'name' as the non -md workflow.
name: Linux
name: Build
on:
pull_request:
@ -15,11 +15,14 @@ on:
jobs:
build-test:
runs-on: ubuntu-latest
strategy:
matrix:
version: [net6.0]
os: [ windows-latest, ubuntu-latest ]
version: [ net462, net6.0, net7.0 ]
exclude:
- os: ubuntu-latest
version: net462
runs-on: ubuntu-latest
steps:
- run: 'echo "No build required"'

View File

@ -1,4 +1,4 @@
name: Windows
name: Build
on:
push:
@ -12,12 +12,15 @@ on:
jobs:
build-test:
runs-on: windows-latest
strategy:
matrix:
os: [ windows-latest, ubuntu-latest ]
version: [ net462, net6.0, net7.0 ]
exclude:
- os: ubuntu-latest
version: net462
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
with:
@ -34,4 +37,4 @@ jobs:
run: dotnet build --configuration Release --no-restore
- name: Test ${{ matrix.version }}
run: dotnet test **\bin\**\${{ matrix.version }}\*Tests.dll --configuration Release --no-build --logger:"console;verbosity=detailed"
run: dotnet test **/bin/**/${{ matrix.version }}/*Tests.dll --configuration Release --no-build --logger:"console;verbosity=detailed"

View File

@ -1,25 +0,0 @@
# Syntax: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions
# See also: https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/troubleshooting-required-status-checks#handling-skipped-but-required-checks
# Description: This workflow exists to unblock documentation-only PRs.
# IMPORTANT: This workflow MUST use the same 'name' as the non -md workflow.
name: Windows
on:
pull_request:
branches: [ 'main*' ]
paths:
- '**.md'
jobs:
build-test:
runs-on: ubuntu-latest
strategy:
matrix:
version: [net462,net6.0,net7.0]
steps:
- run: 'echo "No build required"'

View File

@ -93,19 +93,17 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "workflows", "workflows", "{
ProjectSection(SolutionItems) = preProject
.github\workflows\apicompatibility.yml = .github\workflows\apicompatibility.yml
.github\workflows\code-coverage.yml = .github\workflows\code-coverage.yml
.github\workflows\ci.yml = .github\workflows\ci.yml
.github\workflows\ci-md.yml = .github\workflows\ci-md.yml
.github\workflows\codeql-analysis.yml = .github\workflows\codeql-analysis.yml
.github\workflows\docfx.yml = .github\workflows\docfx.yml
.github\workflows\dotnet-format-md.yml = .github\workflows\dotnet-format-md.yml
.github\workflows\dotnet-format.yml = .github\workflows\dotnet-format.yml
.github\workflows\integration-md.yml = .github\workflows\integration-md.yml
.github\workflows\integration.yml = .github\workflows\integration.yml
.github\workflows\linux-ci-md.yml = .github\workflows\linux-ci-md.yml
.github\workflows\linux-ci.yml = .github\workflows\linux-ci.yml
.github\workflows\markdownlint.yml = .github\workflows\markdownlint.yml
.github\workflows\publish-packages-1.0.yml = .github\workflows\publish-packages-1.0.yml
.github\workflows\sanitycheck.yml = .github\workflows\sanitycheck.yml
.github\workflows\windows-ci-md.yml = .github\workflows\windows-ci-md.yml
.github\workflows\windows-ci.yml = .github\workflows\windows-ci.yml
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{C1542297-8763-4DF4-957C-489ED771C21D}"