Skip to content

Add backlinks to query builder #2994

Add backlinks to query builder

Add backlinks to query builder #2994

Workflow file for this run

name: Tests
on:
push:
branches:
- master
- ci
pull_request:
branches:
- master
workflow_dispatch:
inputs: {}
merge_group:
types: [checks_requested]
jobs:
test:
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash
env:
PIP_DISABLE_PIP_VERSION_CHECK: 1
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13"]
gel-version: [6, nightly]
os: [ubuntu-latest, macos-latest, windows-2025]
loop: [asyncio, uvloop]
exclude:
# uvloop does not support windows
- loop: uvloop
os: windows-2025
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 50
submodules: true
- name: Check if release PR.
uses: geldata/action-release/validate-pr@master
id: release
with:
github_token: ${{ secrets.RELEASE_BOT_GITHUB_TOKEN }}
missing_version_ok: yes
version_file: gel/_version.py
version_line_pattern: |
__version__\s*=\s*(?:['"])([[:PEP440:]])(?:['"])
# If this is a release PR, skip tests. They will be run
# as part of the release process, and running them here
# might interfere with the release automation due to
# branch restrictions.
- name: Setup WSL
if: ${{ steps.release.outputs.version == 0 && startsWith(matrix.os, 'windows-') }}
uses: vampire/setup-wsl@6a8db447be7ed35f2f499c02c6e60ff77ef11278 # v6.0.0
with:
wsl-shell-user: edgedb
distribution: Ubuntu-24.04
additional-packages:
ca-certificates
curl
- name: Install Gel
uses: geldata/setup-gel@v1
if: steps.release.outputs.version == 0
with:
server-version: ${{ matrix.gel-version }}
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
if: steps.release.outputs.version == 0
with:
python-version: ${{ matrix.python-version }}
- name: Install uv
uses: astral-sh/setup-uv@f0ec1fc3b38f5e7cd731bb6ce540c5af426746bb #v6.1.0
if: steps.release.outputs.version == 0
- name: Test
if: steps.release.outputs.version == 0
env:
LOOP_IMPL: ${{ matrix.loop }}
SERVER_VERSION: ${{ matrix.gel-version }}
run: |
if [ "${LOOP_IMPL}" = "uvloop" ]; then
export USE_UVLOOP=1
fi
mkdir "${{ runner.temp }}/pytests"
ln -s "${{ github.workspace }}/tests" "${{ runner.temp }}/pytests/tests"
export GEL_PYTHON_TEST_ROOT="${{ runner.temp }}/pytests"
uv run --extra=test --no-editable --isolated \
--project="${{ github.workspace }}" \
--directory="${{ runner.temp }}/pytests" \
--with "geltest@git+https://github.com/geldata/geltest.git" \
geltest --verbose --exclude test_cqa_ruff
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: astral-sh/ruff-action@57714a7c8a2e59f32539362ba31877a1957dded1 # v3.5.1
with:
version: "0.12.11"
- run: ruff check
- run: ruff format --check
# This job exists solely to act as the test job aggregate to be
# targeted by branch policies.
regression-tests:
name: "Regression Tests"
needs: [test, lint]
runs-on: ubuntu-latest
steps:
- run: echo OK