Skip to content
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
9 changes: 6 additions & 3 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
**Description**
# Description

Include a summary of the change and which issue is fixed. Please also include
relevant motivation and context. List any dependencies that are required for
this change.

Fixes # (issue)
If this is a hotfix to a released version, please specify it.

**How Has This Been Tested?**
## How has this been tested?

Please describe the tests that you ran to verify your changes. Please also note
any relevant details for your test configuration (e.g. compiler, OS). Include
enough information so someone can reproduce your tests.

**Checklist:**
## Checklist

- [ ] My code follows the style guidelines of this project
- [ ] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
Expand Down
44 changes: 44 additions & 0 deletions .github/workflows/create-cache.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: "Create GHA cache"

# GitHub puts the following restrictions on cache sharing. PRs can access
#
# - caches that were created by the PR / earlier runs of the PR
# - caches that were created on the target branch
#
# To get effective cache sharing between PRs, we create caches on the `develop`
# branch (which is where almost all PRs merge into).

on:
push:
branches: [develop]

# Cancel running jobs if there's a newer push
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
# GitHub Actions cache of the pre-commit environment
pre-commit:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup Python 3.11
uses: actions/setup-python@v5
with:
python-version: '3.11'

- uses: actions/cache@v4
id: cache
with:
path: ~/.cache/pre-commit
key: pre-commit_${{ env.pythonLocation }}_${{ hashFiles('.pre-commit-config.yaml') }}
lookup-only: true # don't actually download the cache

- name: Populate pre-commit environment (if not cached)
if: steps.cache.outputs.cache-hit != 'true'
run: |
pip install pre-commit
pre-commit install --install-hooks
4 changes: 3 additions & 1 deletion .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ jobs:
with:
python-version: '3.11'

- uses: actions/cache@v4
# Only restore (don't save) caches on PRs. New caches created from PRs won't be
# accessible from other PRs, see workflows/create-cache.yaml.
- uses: actions/cache/restore@v4
with:
path: ~/.cache/pre-commit
key: pre-commit_${{ env.pythonLocation }}_${{ hashFiles('.pre-commit-config.yaml') }}
Expand Down