-
Notifications
You must be signed in to change notification settings - Fork 6
37 lines (37 loc) · 1.21 KB
/
tests.yml
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
on: [push, pull_request]
name: Supported Python Compatibility Test
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-2019]
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']
include:
- os: macos-latest
- os: ubuntu-latest
- os: windows-2019
fail-fast: false
name: Python ${{ matrix.python-version }} ${{ matrix.os }} build
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'pip' # caching pip dependencies
- name: Install requirements
run: |
pip install tox
- uses: actions/github-script@v7
id: tox-env
with:
result-encoding: string
script: |
const frontend = "${{matrix.frontend}}"
const toxEnv = "py${{matrix.python-version}}".replace('.','')
if(frontend === ""){
return toxEnv
}
return "py${{matrix.python-version}}".replace('.','') + "-${{matrix.frontend}}"
- name: Run tox
run: tox -e ${{ steps.tox-env.outputs.result }}