Skip to content

Commit abf595e

Browse files
committed
Make GitHub action / test workflow working with python 2.7 again
Support for [python2.7 has been removed](actions/setup-python#672) on June 19. Until xled supports 2.7 try to support 2.7 in CI.
1 parent 3c73021 commit abf595e

File tree

1 file changed

+28
-2
lines changed

1 file changed

+28
-2
lines changed

.github/workflows/test.yml

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
strategy:
1212
fail-fast: false
1313
matrix:
14-
python-version: [2.7, 3.7, 3.8, 3.9, "3.10", "3.11"]
14+
python-version: [3.7, 3.8, 3.9, "3.10", "3.11"]
1515
os: [ubuntu-latest]
1616

1717
steps:
@@ -28,4 +28,30 @@ jobs:
2828
python -m pip install --upgrade tox
2929
- name: Unit tests
3030
run: |
31-
tox -e py
31+
tox --skip-missing-interpreters -e py
32+
33+
build27:
34+
runs-on: ubuntu-latest
35+
36+
steps:
37+
- uses: actions/checkout@v2
38+
39+
- name: Set up Python 2.7
40+
uses: MatteoH2O1999/setup-python@v1
41+
with:
42+
python-version: 2.7
43+
allow-build: allow
44+
cache: pip
45+
46+
- name: Install dependencies
47+
run: |
48+
python -m pip install --upgrade pip &&
49+
python -m pip install --upgrade tox
50+
51+
- name: Unit tests
52+
run: |
53+
sudo apt-get update && sudo apt-get install -y locales
54+
sudo sed -i -e "s/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/" /etc/locale.gen &&
55+
sudo dpkg-reconfigure --frontend=noninteractive locales &&
56+
sudo update-locale LANG=en_US.UTF-8 &&
57+
LANG=en_US.UTF-8 tox -e py27

0 commit comments

Comments
 (0)