47 lines
1.4 KiB
YAML
47 lines
1.4 KiB
YAML
# Called by ci.yml to perform dotnet format linting
|
|
# See: https://docs.github.com/en/actions/using-workflows/reusing-workflows#creating-a-reusable-workflow
|
|
name: Lint - dotnet format
|
|
|
|
on:
|
|
workflow_call:
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
run-dotnet-format-stable:
|
|
runs-on: windows-latest
|
|
|
|
steps:
|
|
- name: check out code
|
|
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
|
|
|
- name: Setup dotnet
|
|
uses: actions/setup-dotnet@67a3573c9a986a3f9c594539f4ab511d57bb3ce9 # v4.3.1
|
|
|
|
- name: dotnet restore
|
|
run: dotnet restore OpenTelemetry.sln
|
|
|
|
- name: dotnet format
|
|
run: dotnet format OpenTelemetry.sln --no-restore --verify-no-changes # Note: .proj files are currently not supported by dotnet format
|
|
env:
|
|
ExposeExperimentalFeatures: false
|
|
|
|
run-dotnet-format-experimental:
|
|
runs-on: windows-latest
|
|
|
|
steps:
|
|
- name: check out code
|
|
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
|
|
|
- name: Setup dotnet
|
|
uses: actions/setup-dotnet@67a3573c9a986a3f9c594539f4ab511d57bb3ce9 # v4.3.1
|
|
|
|
- name: dotnet restore
|
|
run: dotnet restore OpenTelemetry.sln
|
|
|
|
- name: dotnet format
|
|
run: dotnet format OpenTelemetry.sln --no-restore --verify-no-changes # Note: .proj files are currently not supported by dotnet format
|
|
env:
|
|
ExposeExperimentalFeatures: true
|