-
-
Notifications
You must be signed in to change notification settings - Fork 95
62 lines (57 loc) · 1.7 KB
/
Copy pathtest-suite.yml
File metadata and controls
62 lines (57 loc) · 1.7 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
name: Test Suite
on:
workflow_call:
inputs:
python:
description: Python version
type: string
default: "3.x"
platform:
description: Runner platform
type: string
default: ubuntu-latest
tox-env:
description: >-
Tox environment to run; if empty, runs default tox
type: string
default: ""
env:
# Environment variable to support color support (jaraco/skeleton#66)
FORCE_COLOR: 1
# Suppress noisy pip warnings
PIP_DISABLE_PIP_VERSION_CHECK: 'true'
PIP_NO_WARN_SCRIPT_LOCATION: 'true'
# Ensure tests can sense settings about the environment
TOX_OVERRIDE: >-
testenv.pass_env+=GITHUB_*,FORCE_COLOR
jobs:
run:
runs-on: ${{ inputs.platform }}
# Tolerate failures on pre-release Pythons (jaraco/skeleton#199)
continue-on-error: ${{ inputs.python == '3.15' }}
permissions:
contents: read
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install build dependencies
# Install dependencies for building packages on pre-release Pythons
# jaraco/skeleton#161
if: inputs.python == '3.15' && inputs.platform == 'ubuntu-latest'
run: |
sudo apt update
sudo apt install -y libxml2-dev libxslt-dev
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: ${{ inputs.python }}
allow-prereleases: true
- name: Install tox
run: python -m pip install tox
- name: Run
if: ${{ !inputs.tox-env }}
run: tox
- name: Run ${{ inputs.tox-env }}
if: ${{ inputs.tox-env }}
run: tox -e ${{ inputs.tox-env }}