Consolidate PR validation into one file with multiple jobs #1
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: Validate PR | |
on: | |
pull_request: | |
branches: [ "main" ] | |
jobs: | |
build: | |
######################################################################### | |
name: build-and-test | |
runs-on: windows-latest | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v4 | |
with: | |
# GitHelper unit test requires full clone, not the shallow default of GitHub Actions | |
fetch-depth: 0 | |
- name: Setup dotnet | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: '3.1.x' | |
- name: Show dotnet info | |
run: dotnet --info | |
- name: Build and Test | |
# NoFormat because there is a separate format check action below | |
run: ./BuildAndTest.cmd -NoFormat | |
######################################################################### | |
build-multitool-for-npm: | |
runs-on: windows-latest | |
steps: | |
- name: Checkout out code | |
uses: actions/checkout@v4 | |
- name: Build Multitool for npm | |
run: ./scripts/BuildMultitoolForNpm.ps1 | |
######################################################################### | |
check-format: | |
runs-on: windows-latest | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v2 | |
- name: Install format tool | |
run: dotnet tool install -g dotnet-format | |
- name: dotnet format | |
run: dotnet-format --folder --check --exclude .\src\Sarif\Autogenerated\ |