Skip to content

Commit 329987e

Browse files
committed
workflows: Upgrades in the release workflow
1 parent 6f21a2d commit 329987e

File tree

5 files changed

+52
-51
lines changed

5 files changed

+52
-51
lines changed

.github/workflows/install-edgedb.sh

Lines changed: 0 additions & 24 deletions
This file was deleted.

.github/workflows/install-gel.sh

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
#!/bin/bash
2+
3+
set -Eexuo pipefail
4+
shopt -s nullglob
5+
6+
srv="https://packages.geldata.com"
7+
8+
curl -fL "${srv}/dist/$(uname -m)-unknown-linux-musl/gel-cli" \
9+
> "/usr/bin/gel"
10+
11+
chmod +x "/usr/bin/gel"
12+
13+
if command -v useradd >/dev/null 2>&1; then
14+
useradd --shell /bin/bash gel
15+
else
16+
# musllinux/alpine doesn't have useradd
17+
adduser -s /bin/bash -D gel
18+
fi
19+
20+
su -l gel -c "gel server install --version ${GEL_SERVER_VERSION}"
21+
ln -s $(su -l gel -c "gel server info --latest --bin-path") \
22+
"/usr/bin/gel-server"
23+
24+
gel-server --version

.github/workflows/release.yml

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
mkdir -p dist/
4444
echo "${VERSION}" > dist/VERSION
4545
46-
- uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0
46+
- uses: actions/upload-artifact@v4
4747
with:
4848
name: dist-version
4949
path: dist/
@@ -56,20 +56,20 @@ jobs:
5656
PIP_DISABLE_PIP_VERSION_CHECK: 1
5757

5858
steps:
59-
- uses: actions/checkout@v3
59+
- uses: actions/checkout@v4
6060
with:
6161
fetch-depth: 50
6262
submodules: true
6363

6464
- name: Set up Python
65-
uses: actions/setup-python@v2
65+
uses: actions/setup-python@v5
6666

6767
- name: Build source distribution
6868
run: |
6969
pip install -U setuptools wheel pip build
7070
python -m build --sdist
7171
72-
- uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0
72+
- uses: actions/upload-artifact@v4
7373
with:
7474
name: dist-source
7575
path: dist/*.tar.*
@@ -80,19 +80,19 @@ jobs:
8080
outputs:
8181
include: ${{ steps.set-matrix.outputs.include }}
8282
steps:
83-
- uses: actions/checkout@v3
84-
- uses: actions/setup-python@v4
83+
- uses: actions/checkout@v4
84+
- uses: actions/setup-python@v5
8585
with:
8686
python-version: "3.x"
87-
- run: pip install cibuildwheel==2.22.0
87+
- run: pip install cibuildwheel==3.0.1
8888
- id: set-matrix
8989
# Cannot test on Musl distros yet.
9090
run: |
9191
MATRIX_INCLUDE=$(
9292
{
93-
cibuildwheel --print-build-identifiers --platform linux --arch x86_64,aarch64 | grep cp | grep many | jq -nRc '{"only": inputs, "os": "ubuntu-latest"}' \
94-
&& cibuildwheel --print-build-identifiers --platform macos --arch x86_64,arm64 | grep cp | jq -nRc '{"only": inputs, "os": "macos-latest"}' \
95-
&& cibuildwheel --print-build-identifiers --platform windows --arch AMD64 | grep cp | jq -nRc '{"only": inputs, "os": "windows-2019"}'
93+
cibuildwheel --print-build-identifiers --platform linux --archs x86_64,aarch64 | grep cp | grep many | jq -nRc '{"only": inputs, "os": "ubuntu-latest"}' \
94+
&& cibuildwheel --print-build-identifiers --platform macos --archs x86_64,arm64 | grep cp | jq -nRc '{"only": inputs, "os": "macos-latest"}' \
95+
&& cibuildwheel --print-build-identifiers --platform windows --archs AMD64 | grep cp | jq -nRc '{"only": inputs, "os": "windows-2025"}'
9696
} | jq -sc
9797
)
9898
echo "include=$MATRIX_INCLUDE" >> $GITHUB_OUTPUT
@@ -111,17 +111,17 @@ jobs:
111111

112112
env:
113113
PIP_DISABLE_PIP_VERSION_CHECK: 1
114-
EDGEDB_SERVER_VERSION: 6
114+
GEL_SERVER_VERSION: 6
115115

116116
steps:
117-
- uses: actions/checkout@v3
117+
- uses: actions/checkout@v4
118118
with:
119119
fetch-depth: 50
120120
submodules: true
121121

122122
- name: Setup WSL
123-
if: ${{ matrix.os == 'windows-2019' }}
124-
uses: vampire/setup-wsl@v2
123+
if: ${{ matrix.os == 'windows-2025' }}
124+
uses: vampire/setup-wsl@6a8db447be7ed35f2f499c02c6e60ff77ef11278 # v6.0.0
125125
with:
126126
wsl-shell-user: edgedb
127127
additional-packages:
@@ -130,22 +130,22 @@ jobs:
130130

131131
- name: Set up QEMU
132132
if: runner.os == 'Linux'
133-
uses: docker/setup-qemu-action@v2
133+
uses: docker/setup-qemu-action@29109295f81e9208d7d86ff1c6c12d2833863392 # v3.6.0
134134

135-
- name: Install EdgeDB
135+
- name: Install Gel
136136
# Linux installs via the CIBW_BEFORE_ALL_LINUX command below
137137
if: runner.os != 'Linux'
138-
uses: edgedb/setup-edgedb@v1
138+
uses: geldata/setup-gel@v1
139139
with:
140-
server-version: ${{ env.EDGEDB_SERVER_VERSION }}
140+
server-version: ${{ env.GEL_SERVER_VERSION }}
141141

142-
- uses: pypa/cibuildwheel@v2.22.0
142+
- uses: pypa/cibuildwheel@v3.0.1
143143
with:
144144
only: ${{ matrix.only }}
145145
env:
146146
CIBW_BUILD_VERBOSITY: 1
147147
CIBW_BEFORE_ALL_LINUX: >
148-
EDGEDB_SERVER_VERSION=${{ env.EDGEDB_SERVER_VERSION }} .github/workflows/install-edgedb.sh
148+
GEL_SERVER_VERSION=${{ env.GEL_SERVER_VERSION }} .github/workflows/install-gel.sh
149149
CIBW_TEST_EXTRAS: "test"
150150
CIBW_TEST_COMMAND: >
151151
python {project}/tests/__init__.py
@@ -155,9 +155,9 @@ jobs:
155155
PY=`which python`
156156
&& CODEGEN=`which gel-py`
157157
&& chmod -R go+rX "$(dirname $(dirname $(dirname $PY)))"
158-
&& su -l edgedb -c "EDGEDB_PYTHON_TEST_CODEGEN_CMD=$CODEGEN $PY {project}/tests/__init__.py"
158+
&& su -l gel -c "GEL_PYTHON_TEST_CODEGEN_CMD=$CODEGEN $PY {project}/tests/__init__.py"
159159
160-
- uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0
160+
- uses: actions/upload-artifact@v4
161161
with:
162162
name: dist-wheel-${{ matrix.only }}
163163
path: wheelhouse/*.whl
@@ -176,12 +176,12 @@ jobs:
176176
deployments: write
177177

178178
steps:
179-
- uses: actions/checkout@v3
179+
- uses: actions/checkout@v4
180180
with:
181181
fetch-depth: 5
182182
submodules: false
183183

184-
- uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
184+
- uses: actions/download-artifact@v4
185185
with:
186186
path: dist/
187187
pattern: dist-*

tests/test_codegen.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ async def run(*args, extra_env=None):
105105
p.returncode, args, output=await p.stdout.read(),
106106
)
107107

108-
cmd = env.get("EDGEDB_PYTHON_TEST_CODEGEN_CMD", "gel-py")
108+
cmd = env.get("GEL_PYTHON_TEST_CODEGEN_CMD", "gel-py")
109109
await run(
110110
cmd, extra_env={"GEL_PYTHON_CODEGEN_PY_VER": "3.11.11"}
111111
)

tests/test_sourcecode.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def test_cqa_ruff_check(self):
4343
for subdir in ["edgedb", "gel", "tests"]:
4444
try:
4545
subprocess.run(
46-
["ruff", "check", "."],
46+
[sys.executable, "-m", "ruff", "check", "."],
4747
check=True,
4848
stdout=subprocess.PIPE,
4949
stderr=subprocess.PIPE,
@@ -66,7 +66,7 @@ def test_cqa_ruff_format_check(self):
6666
for subdir in ["gel"]:
6767
try:
6868
subprocess.run(
69-
["ruff", "format", "--check", "."],
69+
[sys.executable, "-m", "ruff", "format", "--check", "."],
7070
check=True,
7171
stdout=subprocess.PIPE,
7272
stderr=subprocess.PIPE,
@@ -113,6 +113,7 @@ def test_cqa_mypy(self):
113113
f"mypy validation failed:\n{output}"
114114
) from None
115115

116+
@unittest.skipIf(os.environ.get("CIBUILDWHEEL"), "broken in CIBW tests")
116117
def test_cqa_pyright(self):
117118
project_root = find_project_root()
118119
config_path = project_root / "pyproject.toml"

0 commit comments

Comments
 (0)