Skip to content

Commit 0031152

Browse files
committed
Add Hurl smoke tests for examples
1 parent e81be1b commit 0031152

74 files changed

Lines changed: 368 additions & 36 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Example Hurl Tests
2+
3+
on:
4+
push:
5+
branches:
6+
- "main"
7+
paths:
8+
- ".github/workflows/examples-hurl.yml"
9+
- "examples/**"
10+
- "scripts/test-examples-hurl.sh"
11+
- "test.hurl"
12+
- "Dockerfile"
13+
pull_request:
14+
branches:
15+
- "main"
16+
paths:
17+
- ".github/workflows/examples-hurl.yml"
18+
- "examples/**"
19+
- "scripts/test-examples-hurl.sh"
20+
- "test.hurl"
21+
- "Dockerfile"
22+
23+
jobs:
24+
hurl:
25+
runs-on: ubuntu-latest
26+
timeout-minutes: 30
27+
steps:
28+
- uses: actions/checkout@v6
29+
- name: Install Hurl
30+
run: |
31+
version=8.0.0
32+
curl --silent --location "https://github.com/Orange-OpenSource/hurl/releases/download/${version}/hurl-${version}-x86_64-unknown-linux-gnu.tar.gz" | tar xz -C /tmp
33+
echo "/tmp/hurl-${version}-x86_64-unknown-linux-gnu/bin" >> "$GITHUB_PATH"
34+
- name: Set up Docker Buildx
35+
uses: docker/setup-buildx-action@v4
36+
- name: Pull common SQLPage image
37+
run: docker pull lovasoa/sqlpage:main
38+
- name: Run example Hurl tests
39+
run: scripts/test-examples-hurl.sh
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
services:
2+
web:
3+
image: lovasoa/sqlpage:main
4+
ports:
5+
- "8080:8080"
6+
volumes:
7+
- .:/var/www
8+
- ./sqlpage:/etc/sqlpage

examples/CRUD - Authentication/sqlpage/sqlpage.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"listen_on": "localhost:8080",
2+
"listen_on": "0.0.0.0:8080",
33
"database_url": "sqlite://./db/Components.sqlite?mode=rwc",
44
"allow_exec": false,
55
"web_root": "./www"
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../test.hurl
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
services:
2+
web:
3+
image: lovasoa/sqlpage:main
4+
ports:
5+
- "8080:8080"
6+
volumes:
7+
- .:/var/www
8+
- ./sqlpage:/etc/sqlpage
9+
depends_on:
10+
- db
11+
environment:
12+
DATABASE_URL: postgres://postgres:postgres@db/postgres
13+
db:
14+
image: postgis/postgis:latest
15+
platform: linux/amd64
16+
environment:
17+
POSTGRES_PASSWORD: postgres
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../test.hurl

examples/SQLPage developer user interface/docker-compose.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,6 @@ services:
1111
environment:
1212
DATABASE_URL: postgres://root:secret@db/sqlpage
1313
db: # The DB environment variable can be set to "mariadb" or "postgres" to test the code with different databases
14-
ports:
15-
- "5432:5432"
16-
- "3306:3306"
1714
image: postgres
1815
environment:
1916
POSTGRES_USER: root
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../test.hurl
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
services:
2+
web:
3+
image: lovasoa/sqlpage:main
4+
ports:
5+
- "8080:8080"
6+
volumes:
7+
- .:/var/www
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../test.hurl

0 commit comments

Comments
 (0)