-
Notifications
You must be signed in to change notification settings - Fork 14
69 lines (55 loc) · 2.15 KB
/
Copy pathpy-code-style.yml
File metadata and controls
69 lines (55 loc) · 2.15 KB
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
name: Python - Check code style
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the "main" branch
push:
branches: ["main"]
pull_request:
paths:
- "python-wrapper/**" # python code + its resources
branches: ["main"]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
permissions:
contents: read
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
code-style:
# The type of runner that the job will run on
runs-on: ubuntu-latest
defaults:
run:
working-directory: python-wrapper
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Install uv and set the Python version
uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1
with:
python-version: "3.11"
enable-cache: true
- run: uv venv
- run: uv sync --group dev --extra pandas --extra neo4j --extra gds --extra snowflake
- name: Check code style
run: source .venv/bin/activate && cd ${GITHUB_WORKSPACE} && ./scripts/checkstyle.sh
# Type-check the v1 (1.22) side of the GDS compat surface.
code-style-gds-v1:
runs-on: ubuntu-latest
defaults:
run:
working-directory: python-wrapper
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Install uv and set the Python version
uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1
with:
python-version: "3.11"
enable-cache: true
- run: uv venv
- run: uv sync --group dev --extra pandas --extra neo4j --extra gds --extra snowflake
- run: uv pip install --python .venv/bin/python "graphdatascience==1.22"
- name: Check code style (GDS 1.22)
env:
UV_NO_SYNC: "1"
MYPY_TARGETS: "python-wrapper/src"
run: source .venv/bin/activate && cd ${GITHUB_WORKSPACE} && ./scripts/checkstyle.sh