@@ -16,24 +16,35 @@ jobs:
1616 test :
1717 environment :
1818 name : Testing
19- runs-on : ubuntu-latest
2019 strategy :
20+ fail-fast : false
2121 matrix :
22- python-version : [3.7, 3.8, 3.9, "3.10"]
22+ python-version : [3.8, 3.9, "3.10", "3.11", "3.12"]
23+ os : [ubuntu-latest, windows-latest, macos-latest]
24+ include :
25+ - os : ubuntu-latest
26+ path : ~/.cache/pip
27+ - os : macos-latest
28+ path : ~/Library/Caches/pip
29+ - os : windows-latest
30+ path : ~\AppData\Local\pip\Cache
31+ runs-on : ${{ matrix.os }}
2332 steps :
24- - uses : actions/checkout@v3
33+ - uses : actions/checkout@v4
2534 - name : Set up Python ${{ matrix.python-version }}
26- uses : actions/setup-python@v4
35+ uses : actions/setup-python@v5
2736 with :
2837 python-version : ${{ matrix.python-version }}
2938 - name : Cache pip
30- uses : actions/cache@v3
39+ uses : actions/cache@v4
3140 with :
32- path : ~/.cache/pip
33- key : ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }}
41+ path : ${{ matrix.path }}
42+ key : ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }}-${{ matrix.python-version }}
43+ - name : Update pip, wheel and setuptools
44+ run : |
45+ python -m pip install --upgrade pip wheel setuptools
3446 - name : Install dependencies
3547 run : |
36- python -m pip install --upgrade pip wheel
3748 pip install -r requirements.txt
3849 pip install .
3950 - name : Test with pytest
@@ -45,16 +56,16 @@ jobs:
4556 name : Build and publish Python 🐍 distributions 📦 to PyPI
4657 runs-on : ubuntu-latest
4758 steps :
48- - uses : actions/checkout@v3
49- - name : Set up Python 3.9
50- uses : actions/setup-python@v4
59+ - uses : actions/checkout@v4
60+ - name : Set up Python 3.12
61+ uses : actions/setup-python@v5
5162 with :
52- python-version : 3.9
63+ python-version : " 3.12 "
5364 - name : Cache pip
54- uses : actions/cache@v3
65+ uses : actions/cache@v4
5566 with :
5667 path : ~/.cache/pip
57- key : ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }}
68+ key : ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }}-${{ matrix.python-version }}
5869 restore-keys : |
5970 ${{ runner.os }}-pip-
6071 - name : Install requirements
6576 run : |
6677 python setup.py sdist
6778 - name : Publish distribution 📦 to PyPI
68- uses : pypa/gh-action-pypi-publish@v1.5.1
79+ uses : pypa/gh-action-pypi-publish@v1.5.2
6980 with :
7081 password : ${{ secrets.pypi_password }}
7182 release :
7586 runs-on : ubuntu-latest
7687 steps :
7788 - name : Checkout code
78- uses : actions/checkout@v3
89+ uses : actions/checkout@v4
7990 - name : Create Release
8091 id : create_release
8192 uses : actions/create-release@v1.1.4
0 commit comments