Skip to content

Commit 901341a

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 901341a

File tree

1 file changed

+30
-2
lines changed

1 file changed

+30
-2
lines changed

.github/workflows/test.yml

Lines changed: 30 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,32 @@ 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 env
40+
run: |
41+
sudo apt-get update && sudo apt-get install -y locales
42+
sudo sed -i -e "s/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/" /etc/locale.gen &&
43+
sudo dpkg-reconfigure --frontend=noninteractive locales &&
44+
sudo update-locale LANG=en_US.UTF-8
45+
46+
- name: Set up Python 2.7
47+
uses: MatteoH2O1999/setup-python@v1
48+
with:
49+
python-version: 2.7
50+
allow-build: allow
51+
cache: pip
52+
53+
- name: Install dependencies
54+
run: |
55+
python -m pip install --upgrade pip &&
56+
python -m pip install --upgrade tox
57+
- name: Unit tests
58+
run: |
59+
LANG=en_US.UTF-8 tox -e py27

0 commit comments

Comments
 (0)