Skip to content

Commit

Permalink
Try a CI build
Browse files Browse the repository at this point in the history
  • Loading branch information
msullivan committed Sep 18, 2024
1 parent 1b1418e commit 26922b9
Show file tree
Hide file tree
Showing 2 changed files with 113 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/install-edgedb.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/bin/bash

set -Eexuo pipefail
shopt -s nullglob

srv="https://packages.edgedb.com"

curl -fL "${srv}/dist/$(uname -m)-unknown-linux-musl/edgedb-cli" \
> "/usr/bin/edgedb"

chmod +x "/usr/bin/edgedb"

if command -v useradd >/dev/null 2>&1; then
useradd --shell /bin/bash edgedb
else
# musllinux/alpine doesn't have useradd
adduser -s /bin/bash -D edgedb
fi

su -l edgedb -c "edgedb server install --version ${EDGEDB_SERVER_VERSION}"
ln -s $(su -l edgedb -c "edgedb server info --latest --bin-path") \
"/usr/bin/edgedb-server"

edgedb-server --version
89 changes: 89 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
name: Tests

on:
push:
branches:
- master
- ci
pull_request:
workflow_dispatch:
inputs: {}

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.12"]
edgedb-version: [nightly]
os: [ubuntu-24.04]

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 50
submodules: true

- name: "pg_config???"
run: |
pg_config || true
- name: Install EdgeDB
uses: edgedb/setup-edgedb@v1
with:
server-version: ${{ matrix.edgedb-version }}

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Registering deb-src repositories
run: |
sudo sed -i 's/^Types: deb$/Types: deb deb-src/' /etc/apt/sources.list.d/ubuntu.sources
sudo apt-get update
- name: Install PostGIS build deps
run: |
sudo apt-get build-dep postgis
- name: Install Postgres
run: |
sudo apt-get install postgresql-16 postgresql-server-dev-16
- name: Build extension package
run: |
PYTHON=$(dirname $(edgedb server info --latest --bin-path))/python3
make -j8 PYTHON=$PYTHON EDBFLAGS=--no-devmode PG_CONFIG=$(which pg_config)
# - name: Install Python Deps
# if: steps.release.outputs.version == 0
# run: |
# python -m pip install --upgrade setuptools pip wheel
# python -m pip install -e .[test]

# - name: Test
# if: steps.release.outputs.version == 0
# env:
# LOOP_IMPL: ${{ matrix.loop }}
# SERVER_VERSION: ${{ matrix.edgedb-version }}
# run: |
# if [ "${SERVER_VERSION}" = "nightly" ]; then
# export EDGEDB_TEST_CODEGEN_ASSERT_SUFFIX=.assert
# else
# export EDGEDB_TEST_CODEGEN_ASSERT_SUFFIX=.assert${SERVER_VERSION}
# fi
# if [ "${LOOP_IMPL}" = "uvloop" ]; then
# env USE_UVLOOP=1 python -m unittest -v tests.suite
# else
# python -m unittest -v tests.suite
# fi

0 comments on commit 26922b9

Please sign in to comment.