-
Notifications
You must be signed in to change notification settings - Fork 8
89 lines (86 loc) · 2.69 KB
/
pull-request.yaml
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
name: Pull Request
on:
workflow_call:
inputs:
python-version-unit:
required: true
description: "Python version"
type: string
default: "['3.8', '3.10']"
python-version-func:
required: true
description: "Python version"
type: string
default: "3.10"
tox-version:
required: false
description: |
Tox version, which should be used, e.g. `<4`. If not specified, the
latest version of tox will be installed.
type: string
default: ""
working-directory:
required: false
description: "To change working directory"
type: string
default: "."
snapcraft:
required: false
description: |
Flag if snap is tested. If set to true, snapcraft will be installed.
type: boolean
default: false
timeout-minutes:
required: false
description: "Configurable timeout limit for functional test job"
type: number
default: 60
commands:
required: true
description: |
Command to run functional tests in strategies. It accepts a stringified list
of commands, which allows you to run multiple tests with different parameters.
This is a required input field.
Examples:
- "['make functional']"
- "['FUNC_ARGS="--series jammy" make functional',
'FUNC_ARGS="--series focal" make functional']"
- "['tox -e func -- -sv --series jammy', 'tox -e func -- -sv --series focal']"
type: string
juju-channel:
required: false
type: string
default: "3.4/stable"
# actions-operator
provider:
required: false
type: string
default: "lxd"
nested-containers:
required: false
type: boolean
default: false
jobs:
lint-unit:
name: Lint checkers and unit tests
uses: ./.github/workflows/_lint-unit.yaml
secrets: inherit
with:
python-version: ${{ inputs.python-version-unit }}
tox-version: ${{ inputs.tox-version }}
working-directory: ${{ inputs.working-directory }}
func:
uses: ./.github/workflows/_func.yaml
needs:
- lint-unit
secrets: inherit
with:
python-version: ${{ inputs.python-version-func }}
tox-version: ${{ inputs.tox-version }}
working-directory: ${{ inputs.working-directory }}
timeout-minutes: ${{ inputs.timeout-minutes }}
snapcraft: ${{ inputs.snapcraft }}
commands: ${{ inputs.commands }}
provider: ${{ inputs.provider }}
nested-containers: ${{ inputs.nested-containers }}
juju-channel: ${{ inputs.juju-channel }}