|
1 |
| -name: Test Setup Python with Cache |
| 1 | +name: Test Python Versions |
2 | 2 |
|
3 |
| -on: |
4 |
| - push: |
5 |
| - branches: |
6 |
| - - test-pr-896 |
7 |
| - pull_request: |
8 |
| - branches: |
9 |
| - - main |
| 3 | +on: [push, pull_request] |
10 | 4 |
|
11 | 5 | jobs:
|
12 |
| - build: |
13 |
| - runs-on: ${{ matrix.os }} |
| 6 | + test: |
| 7 | + runs-on: windows-latest |
14 | 8 | strategy:
|
15 | 9 | matrix:
|
16 |
| - os: [ubuntu-latest, windows-latest, macos-latest] |
17 |
| - python-version: ["3.12.3"] |
18 |
| - cache: [pip, poetry, pipenv] |
19 |
| - |
| 10 | + python-version: ['3.13', '3.12', '3.9', '3.10', '3.11'] |
20 | 11 | steps:
|
21 | 12 | - name: Checkout repository
|
22 | 13 | uses: actions/checkout@v4
|
23 | 14 |
|
24 |
| - - name: Set up Poetry |
25 |
| - if: matrix.cache == 'poetry' |
26 |
| - run: | |
27 |
| - curl -sSL https://install.python-poetry.org | python3 - |
28 |
| - echo "$HOME/.local/bin" >> $GITHUB_PATH |
29 |
| -
|
30 |
| - - name: Setup Python |
31 |
| - uses: priyagupta108/[email protected] |
| 15 | + - name: Set up Python ${{ matrix.python-version }} |
| 16 | + uses: actions/setup-python@v5 |
32 | 17 | with:
|
33 |
| - python-version: ${{ matrix.python-version }} |
34 |
| - cache: ${{ matrix.cache }} |
| 18 | + python-version: ${{ matrix.python-version }} |
| 19 | + cache: pip |
| 20 | + cache-dependency-path: |
| 21 | + requirements/*.txt |
35 | 22 |
|
36 |
| - - name: Cache dependencies with pip |
37 |
| - if: matrix.cache == 'pip' |
| 23 | + |
| 24 | + |
| 25 | + - name: Install dependencies |
38 | 26 | run: |
|
39 | 27 | python -m pip install --upgrade pip
|
40 | 28 | pip install -r requirements.txt
|
41 | 29 |
|
42 |
| - - name: poetry install |
43 |
| - if: matrix.cache == 'poetry' |
44 |
| - run: | |
45 |
| - poetry install |
46 |
| -
|
47 |
| - - name: Cache dependencies with Pipenv |
48 |
| - if: matrix.cache == 'pipenv' |
| 30 | + - name: Run tests |
49 | 31 | run: |
|
50 |
| - pip install --upgrade pip |
51 |
| - pip install pipenv |
52 |
| - pipenv install |
| 32 | + python test_script.py |
0 commit comments