-
Notifications
You must be signed in to change notification settings - Fork 0
118 lines (110 loc) · 3.32 KB
/
call-python-validation.yaml
File metadata and controls
118 lines (110 loc) · 3.32 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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
---
name: Build & Verify Python Module
on:
workflow_call:
inputs:
runs-on:
required: true
type: string
module-name:
required: true
type: string
python-version:
default: "3.12-slim"
required: false
type: string
ruff-version:
default: "0.8.6"
required: false
type: string
dagger-version:
default: "0.20.0"
required: false
type: string
dagger-module-version:
default: v0.86.0
required: false
type: string
environment-name:
default: k8s
required: true
type: string
accept-linterrors:
default: false
required: false
type: boolean
accept-failedtests:
default: false
required: false
type: boolean
jobs:
Lint-Python:
runs-on: ${{ inputs.runs-on }}
environment: ${{ inputs.environment-name }}
continue-on-error: ${{ inputs.accept-linterrors }}
steps:
- name: Checkout code
uses: actions/checkout@v6.0.2
- name: Lint python code
uses: dagger/dagger-for-github@v8.4.1
with:
version: ${{ inputs.dagger-version }}
verb: call
module: github.com/stuttgart-things/dagger/python@${{ inputs.dagger-module-version }}
args: >-
lint
--src .
--python-version ${{ inputs.python-version }}
--ruff-version ${{ inputs.ruff-version }}
Format-Check-Python:
runs-on: ${{ inputs.runs-on }}
environment: ${{ inputs.environment-name }}
continue-on-error: ${{ inputs.accept-linterrors }}
steps:
- name: Checkout code
uses: actions/checkout@v6.0.2
- name: Check python formatting
uses: dagger/dagger-for-github@v8.4.1
with:
version: ${{ inputs.dagger-version }}
verb: call
module: github.com/stuttgart-things/dagger/python@${{ inputs.dagger-module-version }}
args: >-
format-check
--src .
--python-version ${{ inputs.python-version }}
--ruff-version ${{ inputs.ruff-version }}
Test-Python:
runs-on: ${{ inputs.runs-on }}
environment: ${{ inputs.environment-name }}
continue-on-error: ${{ inputs.accept-failedtests }}
steps:
- name: Checkout code
uses: actions/checkout@v6.0.2
- name: Test python code
uses: dagger/dagger-for-github@v8.4.1
with:
version: ${{ inputs.dagger-version }}
verb: call
module: github.com/stuttgart-things/dagger/python@${{ inputs.dagger-module-version }}
args: >-
test
--src .
--python-version ${{ inputs.python-version }}
Security-Scan-Python:
runs-on: ${{ inputs.runs-on }}
environment: ${{ inputs.environment-name }}
continue-on-error: true
steps:
- name: Checkout code
uses: actions/checkout@v6.0.2
- name: Security scan python code
uses: dagger/dagger-for-github@v8.4.1
with:
version: ${{ inputs.dagger-version }}
verb: call
module: github.com/stuttgart-things/dagger/python@${{ inputs.dagger-module-version }}
args: >-
security-scan
--src .
--python-version ${{ inputs.python-version }}