-
Notifications
You must be signed in to change notification settings - Fork 2
58 lines (52 loc) · 1.66 KB
/
python.yml
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
# Python Testing Workflow
#
# - Automatically runs tests on all supported versions of Python
name: Python
on:
pull_request:
workflow_call:
inputs:
version:
description: 'Python main version to vendor'
type: string
# All Major versions of Python that are currently supported
default: '3.11'
versions:
description: 'Python versions to test against'
type: string
# All Major versions of Python that are currently supported
default: '3.9,3.10,3.11,3.12,3.13'
vendor:
description: 'Whether to vendor the dependencies'
type: string
default: 'true'
jobs:
# Run the tests on all supported versions of Python
testing:
uses: advanced-security/reusable-workflows/.github/workflows/[email protected]
secrets: inherit
with:
versions: ${{ inputs.versions }}
# Run linters on the codebase
linting:
uses: advanced-security/reusable-workflows/.github/workflows/[email protected]
needs: [ testing ]
secrets: inherit
with:
versions: ${{ inputs.versions }}
# Vendor the dependencies into the repository if needed
vendoring:
uses: advanced-security/reusable-workflows/.github/workflows/[email protected]
needs: [ testing, linting ]
if: ${{ inputs.vendor == 'true' }}
secrets: inherit
with:
version: ${{ inputs.version }}
custom-property: 'OSSType'
# Release a new version of the package
release:
uses: advanced-security/reusable-workflows/.github/workflows/[email protected]
needs: [ testing, linting ]
secrets: inherit
with:
version: ${{ inputs.version }}