Install all test dependencies in GH action
This commit is contained in:
parent
ae892580ec
commit
2c365ac768
1 changed files with 16 additions and 17 deletions
33
.github/workflows/python-package.yml
vendored
33
.github/workflows/python-package.yml
vendored
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue