Skip to content

Commit 4c86f8f

Browse files
committed
ci: reusable python action
Signed-off-by: Anas Nashif <[email protected]>
1 parent c4d9289 commit 4c86f8f

File tree

3 files changed

+37
-4
lines changed

3 files changed

+37
-4
lines changed

.github/workflows/assigner.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,12 @@ jobs:
2828
issues: write # to add assignees to issues
2929

3030
steps:
31-
- name: Install Python dependencies
32-
run: |
33-
pip install -U PyGithub>=1.55 west
34-
3531
- name: Check out source code
3632
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
3733

34+
- name: Install Python dependencies
35+
uses: uses: ./.github/workflows/python
36+
3837
- name: Run assignment script
3938
env:
4039
GITHUB_TOKEN: ${{ secrets.ZB_GITHUB_TOKEN }}

.github/workflows/python.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Setup Python
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
python-version:
7+
description: 'Python version.'
8+
required: false
9+
default: '3.12'
10+
type: string
11+
12+
jobs:
13+
- name: Set up Python ${{ inputs.python-version }}
14+
uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0
15+
with:
16+
python-version: ${{ inputs.python-version }}
17+
18+
- name: 🔧 Install common python packages
19+
run: |
20+
python -m pip install -r scripts/requirements-actions.txt

scripts/requirements-actions.txt

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
pygithub
2+
junitparser
3+
junit2html
4+
gcovr
5+
xlsxwriter
6+
ijson
7+
unidiff
8+
sh
9+
pytest
10+
pyyaml
11+
tox
12+
awscli
13+
elasticsearch
14+
west

0 commit comments

Comments
 (0)