Skip to content

Commit

Permalink
Add support github-action python2.7 by the use of a container (#367)
Browse files Browse the repository at this point in the history
* Add support github-action python2.7 by the use of a container

See actions/runner-images#7401 (comment)
  • Loading branch information
pitbulk committed Jul 21, 2023
1 parent 918b4bb commit b82703f
Showing 1 changed file with 26 additions and 4 deletions.
30 changes: 26 additions & 4 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,20 @@ on:
- master

jobs:
test:
test_py3:
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
python-version:
- "2.7"
- "3.5"
- "3.6"
- "3.7"
- "3.8"
- "3.9"
- "3.10"
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
Expand All @@ -46,11 +45,34 @@ jobs:
make install-test
- name: Test
run: make pytest
test_py2:
runs-on: ubuntu-20.04
container:
image: python:2.7.18-buster
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install dependencies
run: |
pip install -U setuptools
apt-get update -qq
apt-get install -qq swig python-dev libxml2-dev libxmlsec1-dev
make install-req
make install-test
- name: Test
run: make pytest
lint:
runs-on: ubuntu-20.04
environment: CI
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- uses: actions/setup-python@v2
with:
python-version: "3.10"
Expand Down

0 comments on commit b82703f

Please sign in to comment.