owlgen: no class needed for terms defined on other vocabularies #971
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Built from: | |
# https://docs.github.com/en/actions/guides/building-and-testing-python | |
# https://github.com/snok/install-poetry#workflows-and-tips | |
name: Build and test linkml | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
workflow_dispatch: | |
jobs: | |
test: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, windows-latest] | |
python-version: ["3.8", "3.9", "3.10"] | |
exclude: | |
- os: windows-latest | |
python-version: "3.8" | |
# See https://github.com/snok/install-poetry#running-on-windows | |
defaults: | |
run: | |
shell: bash | |
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 | |
with: | |
version: 1.3.2 | |
virtualenvs-create: true | |
virtualenvs-in-project: true | |
#---------------------------------------------- | |
# load cached venv if cache exists | |
#---------------------------------------------- | |
- name: Load cached venv | |
id: cached-poetry-dependencies | |
uses: actions/cache@v3 | |
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 | |
#---------------------------------------------- | |
# setup and install graphviz | |
#---------------------------------------------- | |
- name: Setup Graphviz | |
uses: ts-graphviz/setup-graphviz@v1 | |
#---------------------------------------------- | |
# Linting | |
#---------------------------------------------- | |
- name: Lint with black and isort | |
run: poetry run tox -e lint | |
#---------------------------------------------- | |
# coverage report | |
#---------------------------------------------- | |
- name: Generate coverage results | |
run: | | |
poetry run coverage run -m unittest discover | |
poetry run coverage xml | |
poetry run coverage report -m | |
shell: bash | |
#---------------------------------------------- | |
# upload coverage results | |
#---------------------------------------------- | |
- name: Upload coverage report | |
uses: codecov/codecov-action@v3.1.0 | |
with: | |
name: codecov-results-${{ matrix.os }}-${{ matrix.python-version }} | |
token: ${{ secrets.CODECOV_TOKEN }} | |
file: coverage.xml | |
fail_ci_if_error: true |