forked from armadaproject/armada
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathaction.yml
More file actions
51 lines (50 loc) · 1.63 KB
/
Copy pathaction.yml
File metadata and controls
51 lines (50 loc) · 1.63 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
name: "Python tox tests and linting"
description: "Sets up go environment and runs python tests in tox"
inputs:
path:
description: "Path to python package root relative to repo root"
required: true
python-version:
description: "Version of python to setup and run tests against"
required: true
tox-env:
description: "Tox environment to use for running the tests"
required: true
github-token:
description: "Token for authenticated github requests"
required: true
runs:
using: "composite"
steps:
- uses: actions/setup-python@v5
with:
python-version: ${{ inputs.python-version }}
# Tox to run tests; build to build the wheel after tests pass
- run: pip install tox==3.27.1 build twine
shell: bash
- name: Install Protoc
uses: arduino/setup-protoc@v3
with:
version: '23.3'
repo-token: ${{ inputs.github-token }}
# Generate the proto files for python, required for later steps
- run: go run github.com/magefile/mage@v1.15.0 -v buildPython
shell: bash
- name: Run tox format environment
run: tox -e format
shell: bash
working-directory: ${{ inputs.path }}
- name: Verify docs updated if needed
run: tox -e docs-check
shell: bash
working-directory: ${{ inputs.path }}
- name: Run tox python ${{ inputs.python-version }} unit tests
run: tox -e ${{ inputs.tox-env }}
shell: bash
working-directory: ${{ inputs.path }}
- name: Build and verify wheel
run: |
python -m build --wheel
twine check dist/*
shell: bash
working-directory: ${{ inputs.path }}