feat: add method list_metadata to class TigerGraphDatabase #52
This file contains hidden or 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: Pre Merge Checks | |
on: | |
pull_request: | |
types: ["opened", "synchronize", "reopened", "edited"] | |
branches: [ "main" ] | |
permissions: | |
contents: read | |
id-token: write | |
concurrency: | |
group: '${{ github.workflow }} - ${{ github.head_ref || github.ref }}' | |
cancel-in-progress: true | |
jobs: | |
ci: | |
name: Build and Test | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.12' | |
- name: Cache pip dependencies | |
id: cache-pip | |
uses: actions/cache@v4 | |
with: | |
path: ~/.cache/pip | |
key: pip-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }} | |
restore-keys: | | |
pip-${{ runner.os }}- | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install pylint-json2html PyYAML jinja2-cli | |
- name: Replace Config | |
run: | | |
cd tests/integration/core/config | |
jinja2 tigergraph_connection.yaml --format=yaml --strict -D TIGERGRAPH_HOST=${{ secrets.TIGERGRAPH_HOST }} -o temp.yaml | |
mv temp.yaml tigergraph_connection.yaml | |
- name: Cache Poetry dependencies | |
id: cache-poetry | |
uses: actions/cache@v4 | |
with: | |
path: ~/.cache/pypoetry/virtualenvs | |
key: poetry-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }} | |
restore-keys: | | |
poetry-${{ runner.os }}- | |
- name: Install poetry | |
uses: abatilo/actions-poetry@v4 | |
- name: Setup a local virtual environment | |
run: | | |
poetry install --with dev | |
- name: Build | |
run: | | |
poetry build | |
- name: Run the unit tests | |
run: poetry run poe unit_test | |
- name: Run the IT tests | |
run: poetry run poe integration_test | |
- name: Get changed files | |
id: changed-files | |
uses: tj-actions/changed-files@v46 | |
with: | |
files: | | |
**/*.py | |
base_sha: ${{ github.event.pull_request.base.sha }} | |
- name: Run pylint on changed files | |
env: | |
PYTHONPATH: ${{ github.workspace }} | |
run: | | |
if [ -n "${{ steps.changed-files.outputs.all_changed_files }}" ]; then | |
echo "Changed files: ${{ steps.changed-files.outputs.all_changed_files }}" | |
poetry run pylint ${{ steps.changed-files.outputs.all_changed_files }} --exit-zero -E | |
poetry run pylint ${{ steps.changed-files.outputs.all_changed_files }} --output-format=json --output=pylint-report.json --exit-zero -E | |
pylint-json2html -o htmlcov/pylint-report.html pylint-report.json | |
else | |
echo "No Python files changed." | |
fi | |
- name: Upload test result | |
if: always() | |
uses: actions/upload-artifact@v4 | |
with: | |
name: test-result | |
path: | | |
htmlcov/ |