Skip to content

Commit b9d36c5

Browse files
committed
ci
1 parent e90e592 commit b9d36c5

File tree

2 files changed

+11
-65
lines changed

2 files changed

+11
-65
lines changed

.github/workflows/packages.yml

Lines changed: 10 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -246,85 +246,31 @@ jobs:
246246
run: |
247247
systemctl cat sqlpage.service || cat /lib/systemd/system/sqlpage.service
248248
249-
test-rpm-fedora:
250-
name: Test RPM on Fedora ${{ matrix.version }}
249+
test-rpm:
250+
name: Test RPM on ${{ matrix.container }}
251251
needs: build-rpm
252252
runs-on: ubuntu-latest
253253
strategy:
254254
matrix:
255-
version: ["latest", "39", "40"]
256-
container: fedora:${{ matrix.version }}
255+
container: [fedora:latest, rockylinux:8]
256+
container: ${{ matrix.container }}
257257
steps:
258258
- name: Download RPM package
259259
uses: actions/download-artifact@v4
260260
with:
261261
name: rpm-package
262262

263-
- name: Install package
264-
run: |
265-
ls -la
266-
ls -la x86_64/ || true
267-
dnf install -y ./x86_64/*.rpm
268-
269-
- name: Verify installation
270-
run: |
271-
sqlpage --version
272-
command -v sqlpage
273-
rpm -q sqlpage
274-
test -f /usr/bin/sqlpage
275-
test -d /etc/sqlpage
276-
test -f /etc/sqlpage/sqlpage.json
277-
test -d /etc/sqlpage/templates
278-
test -f /usr/lib/systemd/system/sqlpage.service
279-
280-
- name: Test service file
281-
run: |
282-
systemctl cat sqlpage.service || cat /usr/lib/systemd/system/sqlpage.service
283-
284-
- name: Verify user creation
285-
run: |
286-
id sqlpage
287-
getent passwd sqlpage
263+
- name: Install package manager dependencies
264+
run: yum install -y curl sudo ./x86_64/*.rpm
288265

289-
test-rpm-rhel:
290-
name: Test RPM on RHEL-based ${{ matrix.distro }}:${{ matrix.version }}
291-
needs: build-rpm
292-
runs-on: ubuntu-latest
293-
strategy:
294-
matrix:
295-
include:
296-
- distro: rockylinux
297-
version: "9"
298-
- distro: rockylinux
299-
version: "8"
300-
- distro: almalinux
301-
version: "9"
302-
- distro: almalinux
303-
version: "8"
304-
container: ${{ matrix.distro }}:${{ matrix.version }}
305-
steps:
306-
- name: Download RPM package
307-
uses: actions/download-artifact@v4
308-
with:
309-
name: rpm-package
310-
311-
- name: Install package
312-
run: |
313-
ls -la
314-
ls -la x86_64/ || true
315-
yum install -y ./x86_64/*.rpm
316-
317-
- name: Verify installation
266+
- name: Test SQLPage functionality
318267
run: |
319-
sqlpage --version
320-
command -v sqlpage
321-
rpm -q sqlpage
322-
test -f /usr/bin/sqlpage
323-
test -d /etc/sqlpage
268+
echo "SELECT 'json' as component; SELECT 1 as it_works;" > /var/www/sqlpage/index.sql
269+
cd /var/www/sqlpage && sqlpage & sleep 2 && curl -sf http://localhost:8080/ | grep -q it_works && kill %1
324270
325271
publish-packages:
326272
name: Publish Packages to GitHub Release
327-
needs: [test-deb-debian, test-deb-ubuntu, test-rpm-fedora, test-rpm-rhel]
273+
needs: [test-deb-debian, test-deb-ubuntu, test-rpm]
328274
runs-on: ubuntu-latest
329275
if: startsWith(github.ref, 'refs/tags/')
330276
steps:

rpm/sqlpage.spec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ rm -rf %{buildroot}
5555
install -D -m 755 target/superoptimized/sqlpage %{buildroot}%{_bindir}/sqlpage
5656

5757
# Install systemd service
58-
install -D -m 644 sqlpage.service %{buildroot}%{_unitdir}/sqlpage.service
58+
install -D -m 644 debian/sqlpage.service %{buildroot}%{_unitdir}/sqlpage.service
5959

6060
# Install configuration and data files
6161
install -d %{buildroot}%{_sysconfdir}/sqlpage

0 commit comments

Comments
 (0)