Install all test dependencies in GH action

This commit is contained in:
Chris Wesseling 2024-07-18 19:11:51 +02:00
parent ae892580ec
commit 2c365ac768

View file

@ -5,13 +5,12 @@ name: Python package
on:
push:
branches: [ "main" ]
branches: ["main"]
pull_request:
branches: [ "main" ]
branches: ["main"]
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
@ -19,17 +18,17 @@ jobs:
python-version: ["3.9", "3.10", "3.11"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install pytest
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- uses: pre-commit/action@v3.0.1
- name: Test with pytest
run: |
pytest
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install ".[test]"
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- uses: pre-commit/action@v3.0.1
- name: Test with pytest
run: |
pytest