Skip to content

Commit 97ed64e

Browse files
committed
ci: Init e2e testing in CI
Adds a github action triggering an end to end test of edgehog on backend changes. Signed-off-by: Luca Zaninotto <luca.zaninotto@secomind.com>
1 parent ad5e95f commit 97ed64e

File tree

4 files changed

+65
-1
lines changed

4 files changed

+65
-1
lines changed
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
#
2+
# This file is part of Edgehog.
3+
#
4+
# Copyright 2025 SECO Mind Srl
5+
#
6+
# Licensed under the Apache License, Version 2.0 (the "License");
7+
# you may not use this file except in compliance with the License.
8+
# You may obtain a copy of the License at
9+
#
10+
# http://www.apache.org/licenses/LICENSE-2.0
11+
#
12+
# Unless required by applicable law or agreed to in writing, software
13+
# distributed under the License is distributed on an "AS IS" BASIS,
14+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
# See the License for the specific language governing permissions and
16+
# limitations under the License.
17+
#
18+
# SPDX-License-Identifier: Apache-2.0
19+
#
20+
21+
name: export-container
22+
description: "Export backend conteatiner into a `backend.tar` artifact."
23+
runs:
24+
using: "composite"
25+
steps:
26+
- name: Create image tar
27+
shell: bash
28+
run: |
29+
docker image save edgehogdevicemanager/edgehog-backend:latest -o backend.tar
30+
- uses: actions/upload-artifact@v4
31+
with:
32+
path: backend.tar
33+
name: backend.tar
34+
if-no-files-found: error
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
#
2+
# This file is part of Edgehog.
3+
#
4+
# Copyright 2025 SECO Mind Srl
5+
#
6+
# Licensed under the Apache License, Version 2.0 (the "License");
7+
# you may not use this file except in compliance with the License.
8+
# You may obtain a copy of the License at
9+
#
10+
# http://www.apache.org/licenses/LICENSE-2.0
11+
#
12+
# Unless required by applicable law or agreed to in writing, software
13+
# distributed under the License is distributed on an "AS IS" BASIS,
14+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
# See the License for the specific language governing permissions and
16+
# limitations under the License.
17+
#
18+
# SPDX-License-Identifier: Apache-2.0
19+
#
20+
21+
name: import container
22+
description: "Export backend conteatiner into a `backend.tar` artifact."
23+
runs:
24+
using: "composite"
25+
steps:
26+
- uses: actions/download-artifact@v5
27+
- name: Import backend container
28+
shell: bash
29+
run: |
30+
docker image load < backend.tar

.github/workflows/backend-e2e.yaml

Whitespace-only changes.

justfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ _init-edgehog:
104104
_create-edgehog-tenant edgehog-hostname="api.edgehog.localhost":
105105
#!/usr/bin/env bash
106106
admin_jwt=$(cat backend/priv/repo/seeds/keys/admin_jwt.txt)
107-
curl -sf -X POST "http://{{edgehog-hostname}}/admin-api/v1/tenants" \
107+
curl --fail-with-body -X POST "http://{{edgehog-hostname}}/admin-api/v1/tenants" \
108108
-H "Content-Type: application/vnd.api+json" \
109109
-H "Accept: application/vnd.api+json" \
110110
-H "Authorization: Bearer $admin_jwt" \

0 commit comments

Comments
 (0)