From d9c04d0ac2504c5ecd43f4818d42262fc630b602 Mon Sep 17 00:00:00 2001 From: James Stevenson Date: Thu, 28 Mar 2024 17:21:29 -0400 Subject: [PATCH] Add lab template CICD actions (#297) --- .github/workflows/checks.yaml | 21 +++++++++++++++++++++ .github/workflows/pr-priority-label.yaml | 23 +++++++++++++++++++++++ 2 files changed, 44 insertions(+) create mode 100644 .github/workflows/checks.yaml create mode 100644 .github/workflows/pr-priority-label.yaml diff --git a/.github/workflows/checks.yaml b/.github/workflows/checks.yaml new file mode 100644 index 00000000..f319070d --- /dev/null +++ b/.github/workflows/checks.yaml @@ -0,0 +1,21 @@ +name: checks +on: [push, pull_request] +jobs: + deps: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] + steps: + - uses: actions/checkout@v3 + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + + - name: Install dependencies + run: | + python -m pip install pipenv + pipenv install --skip-lock # this is what Elastic beanstalk uses diff --git a/.github/workflows/pr-priority-label.yaml b/.github/workflows/pr-priority-label.yaml new file mode 100644 index 00000000..0bef462d --- /dev/null +++ b/.github/workflows/pr-priority-label.yaml @@ -0,0 +1,23 @@ +name: Pull Request Has Priority Label +on: + pull_request: + types: [opened, labeled, unlabeled, synchronize] +jobs: + pr-priority-label: + runs-on: ubuntu-latest + permissions: + issues: write + pull-requests: write + outputs: + status: ${{ steps.check-labels.outputs.status }} + steps: + - id: check-labels + uses: mheap/github-action-required-labels@v5 + with: + mode: exactly + count: 1 + labels: "priority:*" + use_regex: true + add_comment: true + message: "PRs require a priority label. Please add one." + exit_type: failure