-
Notifications
You must be signed in to change notification settings - Fork 52
43 lines (41 loc) · 1.2 KB
/
reusable-examples.yml
File metadata and controls
43 lines (41 loc) · 1.2 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
name: Reusable Examples Workflow
on:
workflow_call:
inputs:
target-branch:
description: 'Branch to checkout and test (defaults to the calling branch)'
required: false
type: string
default: ''
examples-script:
description: 'Examples script to execute'
required: false
type: string
default: './check-examples.sh'
python-version:
description: 'Python version to use'
required: false
type: string
default: '3.12'
jobs:
examples:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
repository: DataDog/datadog-api-client-python
ref: ${{ inputs.target-branch || github.ref }}
- name: Install Python
uses: actions/setup-python@v4
with:
python-version: ${{ inputs.python-version }}
cache: "pip"
- name: Upgrade pip
run: |
python -m pip install --upgrade pip
pip install --upgrade wheel setuptools build
- name: Install
run: pip install --disable-pip-version-check pyflakes
- name: Check examples
run: ${{ inputs.examples-script }}
shell: bash