mirror of
https://github.com/trustgraph-ai/trustgraph.git
synced 2026-07-24 12:41:02 +02:00
68 lines
1.8 KiB
YAML
68 lines
1.8 KiB
YAML
|
|
name: Test pull request
|
|
|
|
on:
|
|
pull_request:
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
|
|
test:
|
|
|
|
name: Run tests
|
|
runs-on: ubuntu-latest
|
|
|
|
container:
|
|
image: fedora:42
|
|
|
|
steps:
|
|
|
|
- name: Set version
|
|
run: VERSION=1.2.999
|
|
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Setup environment
|
|
run: |
|
|
dnf install -y python3.12 make
|
|
alternatives --install /usr/bin/python python /usr/bin/python3.12 1
|
|
python -m ensurepip --upgrade
|
|
python3.12 -m venv env
|
|
. env/bin/activate
|
|
pip install build wheel
|
|
|
|
- name: Setup packages
|
|
run: make update-package-versions VERSION=1.2.999
|
|
|
|
- name: Build packages
|
|
run: make packages VERSION=1.2.999
|
|
|
|
- run: which python
|
|
- run: which python3.12
|
|
- name: Install packages
|
|
run: pip install dist/trustgraph_base-1.2.999.tar.gz dist/trustgraph_cli-1.2.999.tar.gz dist/trustgraph_flow-1.2.999.tar.gz dist/trustgraph_bedrock-1.2.999.tar.gz dist/trustgraph_vertexai-1.2.999.tar.gz
|
|
|
|
- name: Install some stuff
|
|
run: pip install pytest pytest-cov pytest-asyncio pytest-mock testcontainers
|
|
|
|
- name: Pre-test test
|
|
run: python -c 'import trustgraph.base;print(dir(trustgraph.base))'
|
|
|
|
- name: Pre-test test 2
|
|
run: python -c 'import trustgraph.schema;print(dir(trustgraph.schema))'
|
|
|
|
- name: Pre-test test 3
|
|
run: python -c 'import trustgraph.model;print(dir(trustgraph.model))'
|
|
|
|
- name: Unit tests
|
|
run: python3 -m pytest tests/unit
|
|
|
|
- name: Integration tests (cut the out the long-running tests)
|
|
run: python3 -m pytest tests/integration -m 'not slow'
|
|
|
|
- name: Contract tests
|
|
run: python3 -m pytest tests/contract
|
|
|