FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
climada_python/.github/workflows/pull-request.yml at main · CLIMADA-project/climada_python · GitHub
CLIMADA-project
/
climada_python
Public
Notifications
You must be signed in to change notification settings
Fork
166
Star
477
Code
Issues
128
Pull requests
18
Discussions
Actions
Projects
Wiki
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Discussions
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
climada_python
/
.github
/
workflows
/
pull-request.yml
Copy path
View runs
More file actions
More file actions
Latest commit
History
History
History
50 lines (47 loc) · 1.58 KB
Breadcrumbs
climada_python
/
.github
/
workflows
/
pull-request.yml
Copy path
File metadata and controls
50 lines (47 loc) · 1.58 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
name
:
GitHub CI
#
Execute this for every pull request (opened, reopened, and synchronized)
on
:
[pull_request]
jobs
:
pre-commit-checks
:
name
:
'
Core / Pre-Commit Checks
'
runs-on
:
ubuntu-latest
steps
:
-
name
:
Checkout Repo
uses
:
actions/checkout@v4
with
:
ref
:
${{ github.event.pull_request.head.sha }}
-
name
:
Checkout target commit
run
:
git -c protocol.version=2 fetch --no-tags --prune --no-recurse-submodules --depth=50 origin ${{ github.event.pull_request.base.ref }}
-
name
:
Set up Python 3.11
uses
:
actions/setup-python@v5
with
:
python-version
:
'
3.11
'
-
#
Store the current date to use it as cache key
name
:
Get current date
id
:
date
run
:
echo "date=$(date +%Y-%m-%d)" >> "${GITHUB_OUTPUT}"
-
name
:
Cache dependencies
uses
:
actions/cache@v4
with
:
path
:
|
~/.cache/pip
~/.cache/pre-commit
key
:
${{ github.event.pull_request.head.ref }}-${{ steps.date.outputs.date }}
restore-keys
:
|
${{ github.event.pull_request.head.ref }}
${{ github.event.pull_request.base.ref }}
develop
main
-
name
:
Install pre-commit and hooks
run
:
|
pip install pre-commit
pre-commit install --install-hooks
-
name
:
Run pre-commit checks
run
:
pre-commit run --show-diff-on-failure --from-ref ${{ github.event.pull_request.base.sha }} --to-ref ${{ github.event.pull_request.head.sha }}
Back
|
FazBrowse Home
|
New Git URL