Update pytest.yml workflow

Rename build to test
Remove macos-latest
Remove abatilo/actions-poetry and install Poetry with  pipx instead
Remove name for poetry install and poetry run pytest
Cache dependencies
This commit is contained in:
2022-09-25 21:24:23 +02:00
parent 564cd20f6b
commit 5a2d076f56

View File

@ -6,12 +6,12 @@ env:
WEBHOOK_URL: ${{ secrets.WEBHOOK_URL }}
UPLOAD_FOLDER: ./Uploads
jobs:
build:
test:
strategy:
fail-fast: false
matrix:
python-version: [ "3.9", "3.10" ]
os: [ ubuntu-latest, macos-latest, windows-latest ]
os: [ ubuntu-latest, windows-latest ]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
@ -22,11 +22,7 @@ jobs:
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Run image
uses: abatilo/actions-poetry@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Install dependencies
run: poetry install
- name: Run tests
run: poetry run pytest
cache: 'poetry'
- run: pipx install poetry
- run: poetry install
- run: poetry run pytest