Add modules utils under mix_utils folder to avoid duplication in JSON… #34
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
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@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install Dependencies | |
run: | | |
pip -q install poetry pre-commit | |
poetry install | |
- name: Pre-commit Checks | |
run: pre-commit run --all-files | |
- name: Unit Tests | |
run: poetry run pytest | |
- 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" | |
# 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 | |
# Only push to PyPi when a tag is created starting with 'v' | |
- name: Push to PyPi | |
if: startsWith(github.ref, 'refs/tags/v') | |
run: | | |
poetry config pypi-token.pypi ${{ secrets.PYPI_TOKEN }} | |
poetry publish |