From a543bf5e41747e239c64b68447bf44f681e5f480 Mon Sep 17 00:00:00 2001 From: Taylor Jacovich Date: Mon, 7 Aug 2023 16:22:22 -0400 Subject: [PATCH] Updated github_action to use alt python-2.7 install method. (#278) --- .github/workflows/python_actions.yml | 31 ++++++++++++++++++++++++---- README.md | 2 +- 2 files changed, 28 insertions(+), 5 deletions(-) diff --git a/.github/workflows/python_actions.yml b/.github/workflows/python_actions.yml index 95bbcee..f41db0a 100644 --- a/.github/workflows/python_actions.yml +++ b/.github/workflows/python_actions.yml @@ -5,13 +5,36 @@ on: [pull_request] jobs: build: - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v2 - - uses: actions/setup-python@v2 - with: - python-version: 2.7 + - name: install python2 + run: | + sudo apt-get update + sudo apt-get install python2.7 -y + sudo apt-get install python2.7-dev -y + sudo update-alternatives --install /usr/bin/python python /usr/bin/python2.7 1 + + venv_base_path="/tmp/python27/venv" + venv_dir="bin" + + echo "Bootstrapping pip" + + curl https://bootstrap.pypa.io/pip/2.7/get-pip.py --output get-pip.py + python get-pip.py + rm -f get-pip.py + + echo "Installing virtualenv" + python -m pip install virtualenv + + python -m virtualenv ${venv_base_path} + + source ${venv_base_path}/${venv_dir}/activate + + python -m pip --no-python-version-warning --disable-pip-version-check install --upgrade pip setuptools + + echo "${venv_base_path}/${venv_dir}" >> $GITHUB_PATH - name: Install dependencies run: | diff --git a/README.md b/README.md index 069e3f0..a57bc72 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # ADSimportpipeline -[![Build Status](https://travis-ci.org/adsabs/ADSimportpipeline.svg?branch=master)](https://travis-ci.org/adsabs/ADSimportpipeline) +[![GitHub Actions CI](https://github.com/adsabs/ADSImportPipeline/actions/workflows/python_actions.yml/badge.svg)](https://github.com/adsabs/ADSImportPipeline/actions/workflows/python_actions.yml) [![Coverage Status](https://coveralls.io/repos/adsabs/ADSimportpipeline/badge.svg?branch=master)](https://coveralls.io/r/adsabs/ADSimportpipeline) ## Overview