1
0
mirror of https://github.com/actions/setup-python synced 2024-11-30 21:22:28 +08:00
setup-python/.github/workflows/e2e-cache.yml

131 lines
4.0 KiB
YAML
Raw Normal View History

name: e2e-cache
on:
pull_request:
paths-ignore:
- '**.md'
push:
branches:
- main
- releases/*
paths-ignore:
- '**.md'
permissions:
contents: read
jobs:
python-pip-dependencies-caching:
name: Test pip (Python ${{ matrix.python-version}}, ${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
2022-02-19 01:29:05 +08:00
python-version: ['3.9', 'pypy-3.7-v7.x']
steps:
- uses: actions/checkout@v3
- name: Setup Python
uses: ./
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
- name: Install dependencies
run: pip install numpy pandas requests
python-pipenv-dependencies-caching:
name: Test pipenv (Python ${{ matrix.python-version}}, ${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
2022-06-30 05:41:39 +08:00
python-version: ['3.9', 'pypy-3.9-v7.x']
steps:
- uses: actions/checkout@v3
- name: Setup Python
uses: ./
with:
python-version: ${{ matrix.python-version }}
cache: 'pipenv'
- name: Install pipenv
run: curl https://raw.githubusercontent.com/pypa/pipenv/master/get-pipenv.py | python
- name: Install dependencies
2022-06-30 02:16:07 +08:00
shell: pwsh
run: |
mv ./__tests__/data/Pipfile.lock .
mv ./__tests__/data/Pipfile .
2022-06-30 02:28:20 +08:00
if ("${{ matrix.python-version }}" -Match "pypy") {
2022-06-30 02:16:07 +08:00
pipenv install --keep-outdated --python pypy
2022-06-30 02:38:02 +08:00
} else {
pipenv install --keep-outdated --python ${{ matrix.python-version }}
2022-06-30 02:16:07 +08:00
}
python-poetry-dependencies-caching:
name: Test poetry (Python ${{ matrix.python-version}}, ${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
2022-05-30 21:02:04 +08:00
python-version: ['3.9', 'pypy-3.8']
steps:
- uses: actions/checkout@v3
- name: Install poetry
run: pipx install poetry
- name: Setup Python
uses: ./
with:
python-version: ${{ matrix.python-version }}
cache: 'poetry'
2022-03-29 02:42:47 +08:00
- name: Init pyproject.toml
run: poetry init -n
- name: Install dependencies
run: poetry add flake8
python-pip-dependencies-caching-path:
name: Test pip (Python ${{ matrix.python-version}}, ${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
2022-02-19 01:29:05 +08:00
python-version: ['3.9', 'pypy-3.7-v7.x']
steps:
- uses: actions/checkout@v3
- name: Setup Python
uses: ./
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
cache-dependency-path: __tests__/data/requirements.txt
- name: Install dependencies
run: pip install numpy pandas requests
python-pipenv-dependencies-caching-path:
name: Test pipenv (Python ${{ matrix.python-version}}, ${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
2022-06-30 05:41:39 +08:00
python-version: ['3.9', 'pypy-3.9-v7.x']
steps:
- uses: actions/checkout@v3
- name: Setup Python
uses: ./
with:
python-version: ${{ matrix.python-version }}
cache: 'pipenv'
cache-dependency-path: '**/pipenv-requirements.txt'
- name: Install pipenv
run: curl https://raw.githubusercontent.com/pypa/pipenv/master/get-pipenv.py | python
- name: Install dependencies
2022-06-30 02:16:07 +08:00
shell: pwsh
run: |
mv ./__tests__/data/Pipfile.lock .
mv ./__tests__/data/Pipfile .
2022-06-30 02:28:20 +08:00
if ("${{ matrix.python-version }}" -Match "pypy") {
2022-06-30 02:16:07 +08:00
pipenv install --keep-outdated --python pypy
2022-06-30 02:38:02 +08:00
} else {
pipenv install --keep-outdated --python ${{ matrix.python-version }}
2022-06-30 02:16:07 +08:00
}