diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml index 89e4051..07c87c0 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-app.yml @@ -21,7 +21,23 @@ jobs: python-version: ["2.7", "3.11"] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 + - name: Set up Python 3 + if: matrix.python-version == '3.11' + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + + - name: Install Python 2 + if: matrix.python-version == '2.7' + run: | + sudo apt update + sudo apt install python2 python-pip + sudo update-alternatives --install /usr/bin/python python /usr/bin/python2 1 + sudo update-alternatives --install /usr/bin/python python /usr/bin/python3 2 + printf '1\n' | sudo update-alternatives --config python + cd /usr/bin + sudo ln -s /usr/bin/pip2 ./pip - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v4 with: @@ -33,4 +49,4 @@ jobs: pip install -e . - name: Run test run: | - mamba --enable-coverage \ No newline at end of file + mamba --enable-coverage