1- name : Python Build MLBstats API
1+ name : Python Build MLBstats API
22
33on :
44 push :
@@ -11,28 +11,24 @@ jobs:
1111 runs-on : ubuntu-latest
1212 strategy :
1313 matrix :
14- python-version : ["3.10"]
14+ python-version : ["3.10", "3.11", "3.12" ]
1515
1616 steps :
17- - uses : actions/checkout@v3
17+ - uses : actions/checkout@v4
1818 - name : Set up Python ${{ matrix.python-version }}
19- uses : actions/setup-python@v4
19+ uses : actions/setup-python@v5
2020 with :
2121 python-version : ${{ matrix.python-version }}
22+ - name : Install Poetry
23+ uses : snok/install-poetry@v1
24+ with :
25+ virtualenvs-create : true
26+ virtualenvs-in-project : true
2227 - name : Install dependencies
23- run : |
24- python3 -m pip install --upgrade pip
25- python3 -m pip install --upgrade pytest
26- python3 -m pip install --upgrade build
27- python3 -m pip install --upgrade requests
28- python3 -m pip install --upgrade requests_mock
28+ run : poetry install --no-interaction
2929 - name : Test with mocks with pytest
30- run : |
31- python3 -m pytest tests/mock_tests/*
30+ run : poetry run pytest tests/mock_tests/
3231 - name : Test external tests with pytest
33- run : |
34- python3 -m pytest tests/external_tests/*
35- - name : build and install
36- run : |
37- python3 -m build
38- python3 -m pip install .
32+ run : poetry run pytest tests/external_tests/
33+ - name : Build package
34+ run : poetry build
0 commit comments