Skip to content

Commit eb5bd9c

Browse files
authored
Merge pull request #31 from henryborchers/github-actions
GitHub actions
2 parents 7b554d1 + 49f142b commit eb5bd9c

File tree

2 files changed

+39
-0
lines changed

2 files changed

+39
-0
lines changed

.github/workflows/tests.yml

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
on: [push, pull_request]
2+
name: Supported Python Compatibility Test
3+
jobs:
4+
build:
5+
runs-on: ${{ matrix.os }}
6+
strategy:
7+
matrix:
8+
os: [ubuntu-latest, macos-latest, windows-2019]
9+
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']
10+
include:
11+
- os: macos-latest
12+
- os: ubuntu-latest
13+
- os: windows-2019
14+
fail-fast: false
15+
name: Python ${{ matrix.python-version }} ${{ matrix.os }} build
16+
steps:
17+
- uses: actions/checkout@v4
18+
- uses: actions/setup-python@v5
19+
with:
20+
python-version: ${{ matrix.python-version }}
21+
cache: 'pip' # caching pip dependencies
22+
- name: Install requirements
23+
run: |
24+
pip install tox
25+
- uses: actions/github-script@v7
26+
id: tox-env
27+
with:
28+
result-encoding: string
29+
script: |
30+
const frontend = "${{matrix.frontend}}"
31+
const toxEnv = "py${{matrix.python-version}}".replace('.','')
32+
if(frontend === ""){
33+
return toxEnv
34+
}
35+
return "py${{matrix.python-version}}".replace('.','') + "-${{matrix.frontend}}"
36+
- name: Run tox
37+
run: tox -e ${{ steps.tox-env.outputs.result }}

pyproject.toml

+2
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,5 @@ makeqctoolsreport = "qct_parse.makeqctoolsreport:main"
1717
overcatch = "qct_parse.overcatch:main"
1818
qct-parse = "qct_parse.qct_parse:main"
1919

20+
[tool.tox]
21+
envlist = ["3.9", "3.10", "3.11", "3.12", "3.13"]

0 commit comments

Comments
 (0)