Update run-tests.yml #417
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: dotnet-format | |
on: | |
pull_request: | |
branches: | |
- main | |
workflow_dispatch: | |
env: | |
# Stop wasting time caching packages | |
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true | |
# Disable sending usage data to Microsoft | |
DOTNET_CLI_TELEMETRY_OPTOUT: true | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
name: Code Convention Check | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Setup .NET @ Latest | |
uses: actions/[email protected] | |
- name: Install Ninja | |
uses: seanmiddleditch/gha-setup-ninja@master | |
- name: Configure Project | |
run: sudo cmake -Bcmake-build-release -DBUILD_TESTING=OFF -DCMAKE_BUILD_TYPE=Release . | |
- name: Build Project | |
run: sudo cmake --build cmake-build-release --config=Release | |
- name: Create local runtime NuGet package | |
run: sudo cmake --build cmake-build-release --config=Release --target cpu_features_dotnet_runtime_package | |
- name: Create local NuGet package | |
run: sudo cmake --build cmake-build-release --config=Release --target cpu_features_dotnet_package | |
- name: Add NuGet package to tests | |
run: sudo cmake --build cmake-build-release --config=Release --target add_nuget_package_to_tests | |
- name: Setup dotnet-format tool | |
run: sudo dotnet tool install --global dotnet-format --version 4.1.131201 | |
- name: Check CpuFeaturesDotNet | |
run: sudo dotnet format "src/CpuFeaturesDotNet/CpuFeaturesDotNet.csproj" --verify-no-changes --verbosity diagnostic | |
- name: Check CpuFeaturesDotNet.UnitTesting | |
run: sudo dotnet format "tests/CpuFeaturesDotNet.Testing.csproj" --verify-no-changes --verbosity diagnostic |