Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[repo] CI improvements #5023

Merged
merged 38 commits into from
Jan 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
e19c474
WIP porting workflow improvements from contrib to main.
CodeBlanch Oct 20, 2023
0e02a27
CI cleanup.
CodeBlanch Oct 23, 2023
4efbae7
Merge from main.
CodeBlanch Oct 23, 2023
6b4532a
Fix.
CodeBlanch Oct 23, 2023
5ddb458
Fixes.
CodeBlanch Oct 23, 2023
4300138
Merge remote-tracking branch 'upstream/main' into ci-improvements
CodeBlanch Oct 28, 2023
600313e
Remove non-ascii character.
CodeBlanch Oct 28, 2023
79816af
Tweak.
CodeBlanch Oct 28, 2023
31b789c
Tweak.
CodeBlanch Oct 28, 2023
d776b6d
Fixes.
CodeBlanch Oct 28, 2023
2db4dad
Fixes.
CodeBlanch Oct 28, 2023
112ce8a
Skip target.
CodeBlanch Oct 30, 2023
850f630
Tweaks and cleanup.
CodeBlanch Oct 30, 2023
5f26201
Merge from main.
CodeBlanch Nov 3, 2023
76d73ad
Manual merge of dotnet-format changes.
CodeBlanch Nov 3, 2023
67f5bae
Tweak.
CodeBlanch Nov 3, 2023
6f2305b
Revert net8.0 for w3c integration tests.
CodeBlanch Nov 3, 2023
9e51290
Test build without depth checkout.
CodeBlanch Nov 3, 2023
75dfdbc
Revert "Test build without depth checkout."
CodeBlanch Nov 3, 2023
ed0d044
Merge branch 'main' into ci-improvements
CodeBlanch Nov 15, 2023
be20741
Merge branch 'main' into ci-improvements
CodeBlanch Nov 16, 2023
c37d22f
merge main
Yun-Ting Nov 17, 2023
7d55fb9
update concurrency-tests ci
Yun-Ting Nov 18, 2023
4f5870b
fixed location
Yun-Ting Nov 18, 2023
29d9b86
removed project def in concurrency-tests yml
Yun-Ting Nov 18, 2023
df4b76b
Revert "removed project def in concurrency-tests yml"
Yun-Ting Nov 18, 2023
451e379
Tweaks.
CodeBlanch Nov 18, 2023
13ec712
Merge branch 'main' into ci-improvements
Yun-Ting Nov 21, 2023
60768c5
Merge branch 'main' into ci-improvements
Yun-Ting Nov 28, 2023
951b2a7
Merge from main.
CodeBlanch Dec 7, 2023
2f809cd
Merge branch 'ci-improvements' of https://github.com/CodeBlanch/opent…
CodeBlanch Dec 7, 2023
e1c9d0b
Bump actions/setup-dotnet from 3 to 4
CodeBlanch Dec 7, 2023
e6ee01b
Merge from main.
CodeBlanch Dec 8, 2023
e1d00ad
Add docker-compose.net8.0.yml back to the solution.
CodeBlanch Dec 8, 2023
5b3418e
Code review.
CodeBlanch Dec 8, 2023
5d700b9
Merge remote-tracking branch 'upstream/main' into ci-improvements
CodeBlanch Dec 15, 2023
1549535
Merge branch 'main' into ci-improvements
utpilla Dec 23, 2023
c8a78fc
Merge branch 'main' into ci-improvements
CodeBlanch Jan 8, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 28 additions & 3 deletions .github/codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,32 @@ comment:
require_changes: no

ignore:
- "docs/**/*"
- "examples/**/*"
- "test/**/*"
- "**.md"
- ".github"
- ".vscode"
- "build"
- "docs"
- "examples"
- "src/Shared"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should shared files under src be excluded?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good question. This was copied from contrib but probably shouldn't be here. I'm thinking I'm going to leave it alone to see how codecov handles the new ci and come back to this later to smooth out any rough edges. I haven't figured out a way to make codecov really useful yet on contrib either 🤣

- "test"

flags:
unittests-Solution-Stable:
carryforward: true
paths:
- src

unittests-Solution-Experimental:
carryforward: true
paths:
- src

unittests-Instrumentation-Stable:
carryforward: true
paths:
- src
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update path for instrumentation?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure on this either. InstrumentationLibraries.proj actually builds and tests everything so this should be fine but 🤷 I'm considering code coverage as a WIP!


unittests-Instrumentation-Experimental:
carryforward: true
paths:
- src
80 changes: 80 additions & 0 deletions .github/workflows/Component.BuildTest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
# Called by ci.yml to build & test project files
# See: https://docs.github.com/en/actions/using-workflows/reusing-workflows#creating-a-reusable-workflow
name: Build Component

on:
workflow_call:
inputs:
project-name:
required: true
type: string
project-build-commands:
default: ''
required: false
type: string
code-cov-name:
required: true
type: string
code-cov-prefix:
default: 'unittests'
required: false
type: string
os-list:
default: '[ "windows-latest", "ubuntu-latest" ]'
required: false
type: string
tfm-list:
default: '[ "net462", "net6.0", "net7.0", "net8.0" ]'
required: false
type: string

jobs:
build-test:

strategy:
fail-fast: false # ensures the entire test matrix is run, even if one permutation fails
matrix:
os: ${{ fromJSON(inputs.os-list) }}
version: ${{ fromJSON(inputs.tfm-list) }}
exclude:
- os: ubuntu-latest
version: net462

runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
with:
# Note: By default GitHub only fetches 1 commit. MinVer needs to find
# the version tag which is typically NOT on the first commit so we
# retrieve them all.
fetch-depth: 0

- name: Setup dotnet
uses: actions/setup-dotnet@v4

- name: dotnet restore ${{ inputs.project-name }}
run: dotnet restore ${{ inputs.project-name }} ${{ inputs.project-build-commands }}

- name: dotnet build ${{ inputs.project-name }}
run: dotnet build ${{ inputs.project-name }} --configuration Release --no-restore ${{ inputs.project-build-commands }}

- name: dotnet test ${{ inputs.project-name }}
run: dotnet test ${{ inputs.project-name }} --collect:"Code Coverage" --results-directory:TestResults --framework ${{ matrix.version }} --configuration Release --no-restore --no-build --logger:"console;verbosity=detailed" -- RunConfiguration.DisableAppDomain=true

- name: Install coverage tool
run: dotnet tool install -g dotnet-coverage

- name: Merging test results
run: dotnet-coverage merge -r -f cobertura -o ./TestResults/Cobertura.xml ./TestResults/*.coverage

- name: Upload code coverage ${{ inputs.code-cov-prefix }}-${{ inputs.code-cov-name }}
uses: codecov/codecov-action@v3.1.4
continue-on-error: true # Note: Don't fail for upload failures
env:
OS: ${{ matrix.os }}
TFM: ${{ matrix.version }}
with:
file: TestResults/Cobertura.xml
env_vars: OS,TFM
flags: ${{ inputs.code-cov-prefix }}-${{ inputs.code-cov-name }}
name: Code Coverage for ${{ inputs.code-cov-prefix }}-${{ inputs.code-cov-name }} on [${{ matrix.os }}.${{ matrix.version }}]
26 changes: 0 additions & 26 deletions .github/workflows/ci-aot-md.yml

This file was deleted.

33 changes: 0 additions & 33 deletions .github/workflows/ci-concurrency-md.yml

This file was deleted.

28 changes: 0 additions & 28 deletions .github/workflows/ci-instrumentation-libraries-md.yml

This file was deleted.

41 changes: 0 additions & 41 deletions .github/workflows/ci-instrumentation-libraries.yml

This file was deleted.

41 changes: 0 additions & 41 deletions .github/workflows/ci-md.yml

This file was deleted.

Loading