Skip to content

Update pytest requirement from ~=7.3 to ~=7.4 #346

Update pytest requirement from ~=7.3 to ~=7.4

Update pytest requirement from ~=7.3 to ~=7.4 #346

Workflow file for this run

name: CI - Tests
on:
pull_request:
push:
branches:
- develop
- stable
- 'push-action/**'
jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Python 3.8
uses: actions/setup-python@v4
with:
python-version: "3.8"
- name: Install dependencies
run: |
python -m pip install -U pip
pip install -U setuptools wheel
while IFS="" read -r line || [ -n "${line}" ]; do
if [[ "${line}" =~ ^pre-commit.*$ ]]; then
pre_commit="${line}"
fi
done < requirements/requirements_dev.txt
pip install ${pre_commit}
- name: Test with pre-commit
run: pre-commit run --all-files --show-diff-on-failure
pytest:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.7", "3.8", "3.9"]
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version}}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version}}
- name: Install initial dependencies
run: |
python -m pip install -U pip
pip install -U setuptools wheel
pip install -e .[testing]
- name: PyTest
run: pytest -vvv --cov=optimade_client --cov-report=xml --cov-append tests/
- name: Install server dependencies
run: pip install -e .[server]
- name: PyTest (with 'server' extra)
run: pytest --cov=optimade_client --cov-report=xml --cov-append tests/cli/
- name: Upload coverage to Codecov
if: matrix.python-version == 3.8 && github.repository == 'CasperWA/voila-optimade-client'
uses: codecov/codecov-action@v3
with:
name: optimade-client
file: ./coverage.xml
flags: optimade-client
build-package:
name: Build source distribution
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Check build and installation of PyPI source distribution
uses: CasperWA/check-sdist-action@v1