From 21cc4133d6ecac1c3b8970b95d1ff6b1725171d2 Mon Sep 17 00:00:00 2001 From: deacon-mp Date: Mon, 16 Mar 2026 21:36:00 -0400 Subject: [PATCH] Add GitHub Actions workflows to match caldera core --- .github/workflows/greetings.yml | 19 +++++++++++++++++++ .github/workflows/stale.yml | 26 ++++++++++++++++++++++++++ .github/workflows/testing.yml | 31 +++++++++++++++++++++++++------ 3 files changed, 70 insertions(+), 6 deletions(-) create mode 100644 .github/workflows/greetings.yml create mode 100644 .github/workflows/stale.yml diff --git a/.github/workflows/greetings.yml b/.github/workflows/greetings.yml new file mode 100644 index 00000000..68a25b6c --- /dev/null +++ b/.github/workflows/greetings.yml @@ -0,0 +1,19 @@ +name: Greetings + +on: [pull_request, issues] + +permissions: + contents: read + +jobs: + greeting: + runs-on: ubuntu-latest + permissions: + issues: write + pull-requests: write + steps: + - uses: actions/first-interaction@1d8459ca65b335265f1285568221e229d45a995e + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + issue-message: 'Looks like your first issue -- we aim to respond to issues as quickly as possible. In the meantime, check out our documentation here: http://caldera.readthedocs.io/' + pr-message: 'Wohoo! Your first PR -- thanks for contributing!' diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml new file mode 100644 index 00000000..d2ed99a5 --- /dev/null +++ b/.github/workflows/stale.yml @@ -0,0 +1,26 @@ +name: Mark stale issues and pull requests + +on: + schedule: + - cron: "0 0 * * *" + +permissions: + contents: read + +jobs: + stale: + runs-on: ubuntu-latest + permissions: + issues: write + pull-requests: write + steps: + - uses: actions/stale@a20b814fb01b71def3bd6f56e7494d667ddf28da + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + stale-issue-label: 'no-issue-activity' + stale-pr-label: 'no-pr-activity' + stale-pr-message: 'This pull request is stale because it has had no activity for 60 days. Remove the stale label or comment or this will be closed in 60 days' + stale-issue-message: 'This issue is stale because it has had no activity for 60 days. Remove the stale label or comment or this will be closed in 60 days' + exempt-issue-labels: 'feature,keep' + days-before-stale: 60 + days-before-close: 60 diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index b59b7ca7..0770945a 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -1,23 +1,42 @@ -name: Code Testing +name: Code Quality -on: [push] +on: + push: + branches: + - master + pull_request: + types: [opened, synchronize, reopened, ready_for_review] + workflow_dispatch: + +permissions: + contents: read jobs: build: runs-on: ubuntu-latest + permissions: + contents: read + pull-requests: read strategy: fail-fast: false matrix: include: - - python-version: 3.8 - toxenv: py38,coverage-ci + - python-version: 3.10.9 + toxenv: py310,coverage-ci + - python-version: 3.11 + toxenv: py311,coverage-ci + - python-version: 3.12 + toxenv: py312,coverage-ci + - python-version: 3.13 + toxenv: py313,coverage-ci steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 with: submodules: recursive + fetch-depth: 0 - name: Setup python - uses: actions/setup-python@v2 + uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c with: python-version: ${{ matrix.python-version }} - name: Install dependencies