Skip to content

Prepare adding shacl import #360

Prepare adding shacl import

Prepare adding shacl import #360

# see https://github.com/linkml/schemasheets/blob/main/.github/workflows/main.yaml
name: Check Pull Request
# Controls when the action will run.
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest, windows-latest ]
python-version: [ "3.9", "3.10" ]
exclude:
- os: windows-latest
python-version: "3.9"
runs-on: ${{ matrix.os }}
steps:
#----------------------------------------------
# check-out repo and set-up python
#----------------------------------------------
- name: Check out repository
uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
#----------------------------------------------
# install & configure poetry
#----------------------------------------------
- name: Install Poetry
uses: snok/install-poetry@v1.3.1
with:
virtualenvs-create: true
virtualenvs-in-project: true
# # Install dependencies
# - name: pip Install Dependencies
# run: |
# pip install --upgrade pip
# pip install -r requirements.txt
#----------------------------------------------
# load cached venv if cache exists
#----------------------------------------------
- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v2
with:
path: .venv
key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}
#----------------------------------------------
# install dependencies if cache does not exist
#----------------------------------------------
- name: Install dependencies
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: poetry install --no-interaction --no-root
#----------------------------------------------
# install your root project, if required
#----------------------------------------------
- name: Install library
run: poetry install --no-interaction
# - name: Run image
# uses: abatilo/actions-poetry@v2.0.0
# # with:
# # poetry-version: ${{ matrix.poetry-version }}
# - name: View poetry --help
# run: poetry --help
- name: Run test suite
run: |
poetry run pip install -U pytest
poetry run pytest tests/