Skip to content

Update python-app.yml #534

Update python-app.yml

Update python-app.yml #534

Workflow file for this run

name: Test Setup Python with Cache
on:
push:
branches:
- test-pr-896
pull_request:
branches:
- main
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest, macos-13, ubuntu-22.04 ]
python-version: ["3.12.3"]
cache: [pip, poetry, pipenv]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Poetry
if: matrix.cache == 'poetry'
run: |
curl -sSL https://install.python-poetry.org | python3 -
echo "$HOME/.local/bin" >> $GITHUB_PATH
- name: Install poetry
run: pipx install poetry
- name: Setup Python
uses: priyagupta108/[email protected]
with:
python-version: ${{ matrix.python-version }}
cache: ${{ matrix.cache }}
- name: Cache dependencies with pip
if: matrix.cache == 'pip'
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: poetry install
if: matrix.cache == 'poetry'
run: |
poetry install --no-root
- name: Cache dependencies with Pipenv
if: matrix.cache == 'pipenv'
run: |
pip install --upgrade pip
pip install pipenv
pipenv install