Skip to content

Commit af05117

Browse files
authored
Fix codegen test in release CI (#383)
* Use portable server in release CI
1 parent 78465e1 commit af05117

File tree

3 files changed

+10
-12
lines changed

3 files changed

+10
-12
lines changed

.github/workflows/install-edgedb.sh

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,10 @@ curl -fL "${srv}/dist/x86_64-unknown-linux-musl/edgedb-cli" \
1010

1111
chmod +x "/usr/local/bin/edgedb"
1212

13-
# XXX: replace this with edgedb server install once that supports
14-
# portable builds.
15-
curl -fL "${srv}/archive/x86_64-unknown-linux-gnu/edgedb-server-1.0-rc.2%2Bc328744.tar.gz" \
16-
> "/tmp/edgedb-server.tar.gz"
13+
useradd --shell /bin/bash edgedb
1714

18-
mkdir -p "/opt/edgedb-server"
19-
tar -xz --strip-components=1 -C "/opt/edgedb-server" -f "/tmp/edgedb-server.tar.gz"
20-
ln -s "/opt/edgedb-server/bin/edgedb-server" "/usr/local/bin/edgedb-server"
15+
su -l edgedb -c "edgedb server install"
16+
ln -s $(su -l edgedb -c "edgedb server info --latest --bin-path") \
17+
"/usr/local/bin/edgedb-server"
2118

22-
useradd --shell /bin/bash edgedb
2319
edgedb-server --version

.github/workflows/release.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,9 @@ jobs:
122122
python {project}\tests\__init__.py
123123
CIBW_TEST_COMMAND_LINUX: >
124124
PY=`which python`
125+
&& CODEGEN=`which edgedb-py`
125126
&& chmod -R go+rX "$(dirname $(dirname $(dirname $PY)))"
126-
&& su -l edgedb -c "$PY {project}/tests/__init__.py"
127+
&& su -l edgedb -c "EDGEDB_PYTHON_TEST_CODEGEN_CMD=$CODEGEN $PY {project}/tests/__init__.py"
127128
128129
- uses: actions/upload-artifact@v2
129130
with:

tests/test_codegen.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,18 +65,19 @@ async def run(*args, extra_env=None):
6565
await p.wait()
6666
raise
6767

68+
cmd = env.get("EDGEDB_PYTHON_TEST_CODEGEN_CMD", "edgedb-py")
6869
await run(
69-
"edgedb-py", extra_env={"EDGEDB_PYTHON_CODEGEN_PY_VER": "3.7.5"}
70+
cmd, extra_env={"EDGEDB_PYTHON_CODEGEN_PY_VER": "3.7.5"}
7071
)
7172
await run(
72-
"edgedb-py",
73+
cmd,
7374
"--target",
7475
"blocking",
7576
"--no-skip-pydantic-validation",
7677
extra_env={"EDGEDB_PYTHON_CODEGEN_PY_VER": "3.9.2"},
7778
)
7879
await run(
79-
"edgedb-py",
80+
cmd,
8081
"--target",
8182
"async",
8283
"--file",

0 commit comments

Comments
 (0)