Skip to content

Commit 59cc5ed

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 d6cb8d3 commit 59cc5ed

File tree

1 file changed

+80
-0
lines changed

1 file changed

+80
-0
lines changed

.github/workflows/e2e-test.yaml

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
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: End to end test
22+
23+
on:
24+
# Run when pushing to stable branches
25+
push:
26+
paths:
27+
- "backend/**"
28+
- "tools/e2e_test/**"
29+
- ".tool-versions"
30+
- ".github/workflows/e2e-test.yaml"
31+
branches:
32+
- "main"
33+
- "release-*"
34+
# Run on pull requests matching apps
35+
pull_request:
36+
paths:
37+
- "backend/**"
38+
- "tools/e2e_test/**"
39+
- ".tool-versions"
40+
- ".github/workflows/e2e-test.yaml"
41+
42+
defaults:
43+
run:
44+
shell: bash
45+
working-directory: tools/e2e_test
46+
env:
47+
MIX_ENV: test
48+
CARGO_TERM_COLOR: always
49+
SCCACHE_GHA_ENABLED: "true"
50+
RUSTC_WRAPPER: "sccache"
51+
RUST_LOG: "debug"
52+
EDGEHOG_TEST_TENANT: "test"
53+
EDGEHOG_TEST_HOSTNAME: "api.edgehog.localhost"
54+
EDGEHOG_TEST_BEARER: "eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9.eyJlX3RnYSI6IioiLCJpYXQiOjE3Mzg5NDgzODh9.TTiXYs1LucAnS_6RGp7pWg-S30NSt7eqL7lU8BzT5BWlHctk7NYZwC6lftA6WeEb1HKEJfPoUqWeOeZ6oYA0AA"
55+
56+
jobs:
57+
e2e-test:
58+
name: End to end
59+
runs-on: ubuntu-24.04
60+
steps:
61+
- name: Checkout repository
62+
uses: actions/checkout@v5
63+
with:
64+
show-progress: false
65+
- name: Setup Rust toolchain
66+
uses: actions-rust-lang/setup-rust-toolchain@v1.15.2
67+
- uses: mozilla-actions/sccache-action@v0.0.9
68+
- name: Setup `just`
69+
uses: extractions/setup-just@v3
70+
with:
71+
github-token: ${{ secrets.GITHUB_TOKEN }}
72+
- name: Install astartectl
73+
uses: jaxxstorm/action-install-gh-release@v1.10.0
74+
with:
75+
repo: astarte-platform/astartectl
76+
- name: Provision a tenant
77+
run: just provision-tenant
78+
- name: Run e2e test suite
79+
run: |
80+
cargo run

0 commit comments

Comments
 (0)