Skip to content

Commit 2727298

Browse files
Add GitHub Actions workflow for Python package testing
1 parent 6f47f11 commit 2727298

File tree

3 files changed

+48
-1
lines changed

3 files changed

+48
-1
lines changed

.github/workflows/test.yml

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Python package
2+
3+
on:
4+
- push
5+
- pull_request
6+
7+
jobs:
8+
build:
9+
strategy:
10+
matrix:
11+
platform: [ubuntu-20.04, windows-latest]
12+
runs-on: ${{ matrix.platform }}
13+
steps:
14+
- uses: actions/checkout@v3
15+
- name: Set up Python 3.6
16+
uses: actions/setup-python@v4
17+
with:
18+
python-version: '3.6'
19+
- name: Set up Python 3.8
20+
uses: actions/setup-python@v4
21+
with:
22+
python-version: '3.8'
23+
- name: Set up Python 3.10
24+
uses: actions/setup-python@v4
25+
with:
26+
python-version: '3.10'
27+
- name: Set up Python 3.12
28+
uses: actions/setup-python@v4
29+
with:
30+
python-version: '3.12'
31+
- name: Install dependencies
32+
run: |
33+
python -m pip install --upgrade pip
34+
python -m pip install tox
35+
- name: Test with tox
36+
run: python -m tox

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -138,3 +138,5 @@ venv/
138138

139139
# VS Code
140140
.vscode
141+
142+
.python-version

tox.ini

+10-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,11 @@
1+
[tox]
2+
envlist = py36, py37, py38, py39, py310, py311, py312
3+
requires = virtualenv < 20.22.0
4+
isolated_build = true
5+
16
[testenv]
2-
commands=python unit_test.py
7+
deps =
8+
xeger
9+
colorful
10+
commands = python unit_test.py
11+
allowlist_externals = poetry

0 commit comments

Comments
 (0)