Skip to content

Update dependency pre-commit to v3.4.0 #1320

Update dependency pre-commit to v3.4.0

Update dependency pre-commit to v3.4.0 #1320

Workflow file for this run

---
name: Tests
on: [push, pull_request]
jobs:
Linting:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.9
uses: actions/setup-python@v4
with:
python-version: 3.9
- name: Get full python version
id: full-python-version
run: echo ::set-output name=version::$(python -c "import sys; print('-'.join(str(v) for v in sys.version_info))")
- name: Install and configure Poetry
uses: abatilo/actions-poetry@v2.3.0
with:
poetry-version: 1.6.1
- name: Set poetry virtualenv to local
run: poetry config virtualenvs.in-project true
- name: Install dependencies
run: |
poetry install --no-interaction
- name: Linting
run: poetry run pre-commit run --all-files
Tests:
needs: Linting
name: ${{ matrix.os }} / ${{ matrix.python-version }}
strategy:
fail-fast: true
matrix:
os: [ ubuntu-latest ]
python-version: [ '3.9', '3.10', '3.11']
poetry-version: [ 1.6.1 ]
services:
rdf4j:
# Docker Hub image
image: eclipse/rdf4j-workbench:4.3.4
ports:
- 8080:8080
blazegraph:
# Docker Hub image
image: openkbs/blazegraph-docker
ports:
- 9999:9999
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install and configure Poetry
uses: abatilo/actions-poetry@v2.3.0
with:
poetry-version: ${{ matrix.poetry-version }}
- name: Set poetry virtualenv to local
run: poetry config virtualenvs.in-project true
- name: Get full python version
id: full-python-version
shell: bash
run: echo ::set-output name=version::$(python -c "import sys; print('-'.join(str(v) for v in sys.version_info))")
- name: Install dependencies
run: poetry install --no-interaction
- name: Run pytest
if: ${{ ( runner.os != 'Linux' ) || ( matrix.python-version != '3.9' ) }}
run: poetry run pytest -q tests
- name: Run pytest with coverage
if: ${{ ( runner.os == 'Linux' ) && ( matrix.python-version == '3.9' ) }}
run: poetry run pytest -q --cov=cimsparql --cov-report=xml tests
- name: Upload coverage
if: ${{ ( runner.os == 'Linux' ) && ( matrix.python-version == '3.9' ) }}
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage.xml
fail_ci_if_error: true