From 2dab5f2c9999bfa61a9cf48612b55f863598ab4f Mon Sep 17 00:00:00 2001 From: Adam Bollen Date: Tue, 12 Dec 2023 15:59:53 -0800 Subject: [PATCH] Add ymls --- .github/workflows/pr_donotmerge.yml | 20 ++++++++++++++++++++ .github/workflows/pr_validate.yml | 21 +++++++++++++++++++++ 2 files changed, 41 insertions(+) create mode 100644 .github/workflows/pr_donotmerge.yml create mode 100644 .github/workflows/pr_validate.yml diff --git a/.github/workflows/pr_donotmerge.yml b/.github/workflows/pr_donotmerge.yml new file mode 100644 index 00000000..1208feaf --- /dev/null +++ b/.github/workflows/pr_donotmerge.yml @@ -0,0 +1,20 @@ +name: Validate pull request (do not merge) + +on: + pull_request: + types: [opened, labeled, unlabeled, synchronize, ready_for_review] + +jobs: + do_not_merge-check: + runs-on: ubuntu-latest + steps: + - name: Has tag + if: github.base_ref == 'main' && contains( github.event.pull_request.labels.*.name, 'pr/do-not-merge') + run: | + echo "PR blocked: [tag: pr/do-not-merge]" + exit 1 + + - name: All good + if: ${{ success() }} + run: | + echo "All good" diff --git a/.github/workflows/pr_validate.yml b/.github/workflows/pr_validate.yml new file mode 100644 index 00000000..f082dc9b --- /dev/null +++ b/.github/workflows/pr_validate.yml @@ -0,0 +1,21 @@ +name: Validate driver + +on: + pull_request: + +jobs: + test: + + runs-on: ubuntu-latest + strategy: + matrix: + dotnet-version: [ '8.0.x' ] + + steps: + - uses: actions/checkout@v4 + - name: Setup dotnet ${{ matrix.dotnet-version }} + uses: actions/setup-dotnet@v3 + with: + dotnet-version: ${{ matrix.dotnet-version }} + - name: Run unit tests on .NET ${{ matrix.dotnet-version }} + run: dotnet test