Skip to content

Commit a2f9cde

Browse files
Merge pull request #11 from qorix-group/piotrkorkus_cicd
infra: add cicd
2 parents b746061 + ce7d443 commit a2f9cde

7 files changed

Lines changed: 111 additions & 16 deletions

File tree

.bazelrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ build --java_language_version=17
22
build --tool_java_language_version=17
33
build --java_runtime_version=remotejdk_17
44
build --tool_java_runtime_version=remotejdk_17
5-
build --@score-baselibs//score/json:base_library=nlohmann
5+
build --@score_baselibs//score/json:base_library=nlohmann
66

77
test --test_output=errors
88

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# *******************************************************************************
2+
# Copyright (c) 2025 Contributors to the Eclipse Foundation
3+
#
4+
# See the NOTICE file(s) distributed with this work for additional
5+
# information regarding copyright ownership.
6+
#
7+
# This program and the accompanying materials are made available under the
8+
# terms of the Apache License Version 2.0 which is available at
9+
# https://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# SPDX-License-Identifier: Apache-2.0
12+
# *******************************************************************************
13+
name: Build and test scenarios
14+
15+
on:
16+
pull_request:
17+
types: [opened, reopened, synchronize]
18+
19+
jobs:
20+
scenarios-build:
21+
runs-on: ubuntu-latest
22+
steps:
23+
- name: Checkout repository
24+
uses: actions/checkout@v4
25+
26+
- name: Setup Bazel
27+
uses: bazel-contrib/setup-bazel@0.15.0
28+
with:
29+
bazelisk-version: 1.26.0 # newest LTS before 1 Jun 2025
30+
31+
- name: Run build
32+
run: |
33+
bazel build //...
34+
35+
- name: Run tests
36+
run: |
37+
bazel test //...
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
# *******************************************************************************
2+
# Copyright (c) 2025 Contributors to the Eclipse Foundation
3+
#
4+
# See the NOTICE file(s) distributed with this work for additional
5+
# information regarding copyright ownership.
6+
#
7+
# This program and the accompanying materials are made available under the
8+
# terms of the Apache License Version 2.0 which is available at
9+
# https://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# SPDX-License-Identifier: Apache-2.0
12+
# *******************************************************************************
13+
name: Format and Internal Tests of Utils
14+
15+
on:
16+
pull_request:
17+
types: [opened, reopened, synchronize]
18+
19+
jobs:
20+
lint:
21+
runs-on: ubuntu-latest
22+
steps:
23+
- name: Checkout repository
24+
uses: actions/checkout@v4
25+
26+
- name: Set up Python
27+
uses: actions/setup-python@v5
28+
with:
29+
python-version: '3.12'
30+
31+
- name: Install dependencies
32+
run: |
33+
python -m pip install --upgrade pip
34+
pip install -e ".[dev]" || true
35+
36+
- name: Check formatting with Ruff
37+
run: ruff check .
38+
39+
test:
40+
runs-on: ubuntu-latest
41+
steps:
42+
- name: Checkout repository
43+
uses: actions/checkout@v4
44+
45+
- name: Setup Bazel
46+
uses: bazel-contrib/setup-bazel@0.15.0
47+
with:
48+
bazelisk-version: 1.26.0 # newest LTS before 1 Jun 2025
49+
50+
- name: Install Rust (Cargo)
51+
uses: actions-rs/toolchain@v1
52+
with:
53+
toolchain: stable
54+
profile: minimal
55+
components: cargo
56+
57+
- name: Set up Python
58+
uses: actions/setup-python@v5
59+
with:
60+
python-version: '3.12'
61+
62+
- name: Install dependencies
63+
run: |
64+
python -m pip install --upgrade pip
65+
pip install -e ".[dev]" || true
66+
67+
- name: Run tests with pytest
68+
run: pytest tests -v

MODULE.bazel

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
module(
1818
name = "score_test_scenarios",
1919
version = "0.3.0",
20+
compatibility_level = 0,
2021
)
2122

2223
# Starlark language server
@@ -61,15 +62,4 @@ crate.from_cargo(
6162
use_repo(crate, "test_scenarios_rust_crates")
6263

6364
# C++ base libs.
64-
archive_override(
65-
module_name = "rules_boost",
66-
strip_prefix = "rules_boost-master",
67-
urls = ["https://github.com/nelhage/rules_boost/archive/refs/heads/master.tar.gz"],
68-
)
69-
70-
bazel_dep(name = "score-baselibs", version = "0.0.0")
71-
git_override(
72-
module_name = "score-baselibs",
73-
commit = "f0a394a602986ddf7abac6a238b9d44535a4b597",
74-
remote = "https://github.com/eclipse-score/baselibs.git",
75-
)
65+
bazel_dep(name = "score_baselibs", version = "0.1.2")

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[project]
22
name = "testing-utils"
33
version = "0.3.0"
4-
dependencies = ["pytest==8.4.1", "pytest-html==4.1.1", "pytest-repeat==0.9.4"]
4+
dependencies = ["pytest>=8.3.5", "pytest-html>=4.1.1", "pytest-repeat>=0.9.4"]
55
requires-python = ">=3.12"
66
authors = [
77
{ name = "Igor Ostrowski", email = "igor.ostrowski.ext@qorix.ai" },

test_scenarios_cpp/BUILD

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ cc_library(
3535
],
3636
includes = ["include/"],
3737
visibility = ["//visibility:public"],
38-
deps = ["@score-baselibs//score/json:json_parser"],
38+
deps = ["@score_baselibs//score/json:json_parser"],
3939
)
4040

4141
cc_test(

test_scenarios_rust/Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)