[PYG-53, PYG-55, PYG-47] Query across direct relations #758
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
--- | |
name: build | |
on: | |
pull_request: | |
branches: [main] | |
env: | |
PYTHON_VERSION: '3.9' | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ env.PYTHON_VERSION }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip poetry | |
poetry config virtualenvs.create false | |
# Necessary for running the mypy pre-commit hook | |
poetry install -E all | |
- uses: pre-commit/[email protected] | |
build-docs: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ env.PYTHON_VERSION }} | |
- name: Install Dependencies | |
run: | | |
python -m pip install --upgrade --upgrade-strategy eager --no-cache-dir .[docs] | |
- name: Build documentation | |
run: | | |
mkdocs build | |
test-core: | |
name: Test without optional dependencies. | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ env.PYTHON_VERSION }} | |
- name: Install core dependencies | |
run: | | |
python3 -m pip install --upgrade pip poetry | |
poetry config virtualenvs.create false | |
poetry install -E format | |
- name: Test Core | |
run: pytest -m "not cli" cognite tests/test_unit | |
tests: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ env.PYTHON_VERSION }} | |
- name: Install dependencies | |
run: | | |
python3 -m pip install --upgrade pip poetry | |
poetry config virtualenvs.create false | |
poetry install -E all | |
- name: Test | |
run: pytest cognite tests/test_unit -v | |
- name: Test CLI | |
run: pygen --help | |
- uses: codecov/codecov-action@v3 | |
with: | |
file: ./coverage.xml | |
- name: Build package | |
run: poetry build | |
tests-pydantic-v1: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ env.PYTHON_VERSION }} | |
- name: Install dependencies | |
run: | | |
python3 -m pip install --upgrade pip poetry | |
poetry config virtualenvs.create false | |
poetry install -E all | |
# This version is supported by Pyodide | |
pip install pydantic==1.10.7 | |
- name: Test | |
run: pytest cognite tests/test_unit -v | |
- name: Test CLI | |
run: pygen --help |