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

Consolidate PR validation into one file with multiple jobs #2831

Merged
merged 1 commit into from
Oct 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
24 changes: 0 additions & 24 deletions .github/workflows/build-and-test.yml

This file was deleted.

14 changes: 0 additions & 14 deletions .github/workflows/build-multitool-for-npm.yml

This file was deleted.

24 changes: 0 additions & 24 deletions .github/workflows/dotnet-format.yml

This file was deleted.

50 changes: 50 additions & 0 deletions .github/workflows/validate-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Validate PR
on:
pull_request:
branches: [ "main" ]

jobs:
#########################################################################
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\
Loading