Skip to content

Add steps to build project in publishing workflow #176

Add steps to build project in publishing workflow

Add steps to build project in publishing workflow #176

Workflow file for this run

name: Continuous Integration
on:
push:
pull_request:
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version:
- '3.9'
- '3.12'
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install Dependencies
run: |
pip -q install poetry pre-commit rdflib
poetry install
- name: Pre-commit Checks
run: pre-commit run --all-files
- name: Type Checking
run: poetry run mypy case_mapping example.py tests
- name: Unit Tests
run: poetry run pytest --doctest-modules
- name: Run Example
run: poetry run python example.py > case.jsonld
# Ensure that the example output is a valid CASE JSON-LD graph
- name: CASE Export Validation
uses: kchason/[email protected]
with:
case-path: ./
case-version: "case-1.3.0"
extension-filter: "jsonld"
- name: Convert example
run: |
rdfpipe --output-format turtle case.jsonld > case.ttl
test 0 -eq $(grep 'file:' case.ttl | wc -l) || (echo "ERROR:ci.yml:Some graph IRIs do not supply a resolving prefix. Look for the string 'file:///' in the file case.ttl (created by running 'make check') to see these instances." >&2 ; exit 1)
# Always build the package as a sanity check to ensure no issues with the build system
# exist as part of the CI process
- name: Build Package
run: |
poetry build