forked from aws-deadline/.github
-
Notifications
You must be signed in to change notification settings - Fork 0
68 lines (57 loc) · 1.57 KB
/
Copy pathreusable_python_build.yml
File metadata and controls
68 lines (57 loc) · 1.57 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
name: Python Build
on:
workflow_call:
inputs:
branch:
required: false
type: string
commit:
required: false
type: string
python-version:
required: true
type: string
os:
required: true
type: string
jobs:
Python:
name: ${{ inputs.os }}, python ${{ inputs.python-version }}
runs-on: ${{ inputs.os }}
permissions:
contents: read
env:
PYTHON: ${{ inputs.python-version }}
steps:
- uses: actions/checkout@v4
if: ${{ !inputs.branch && !inputs.commit }}
- uses: actions/checkout@v4
if: ${{ inputs.branch }}
with:
ref: ${{ inputs.branch }}
fetch-depth: 0
- uses: actions/checkout@v4
if: ${{ inputs.commit }}
with:
ref: ${{ inputs.commit }}
- name: setup ${{ inputs.os }}
if: inputs.os == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install -y libegl1 libdbus-1-3 libxkbcommon-x11-0 \
libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 \
libxcb-render-util0 libxcb-xinerama0 libxcb-xinput0 libxcb-xfixes0 \
x11-utils libxcb-cursor0 libopengl0
- name: Set up Python ${{ inputs.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ inputs.python-version }}
- name: Install Hatch
run: |
pip install --upgrade hatch
- name: Run Linting
run: hatch -v run lint
- name: Run Build
run: hatch -v build
- name: Run Tests
run: hatch run test