diff --git a/.bazelrc b/.bazelrc index 5f20d3e..fd762dc 100644 --- a/.bazelrc +++ b/.bazelrc @@ -2,7 +2,7 @@ build --java_language_version=17 build --tool_java_language_version=17 build --java_runtime_version=remotejdk_17 build --tool_java_runtime_version=remotejdk_17 -build --@score-baselibs//score/json:base_library=nlohmann +build --@score_baselibs//score/json:base_library=nlohmann test --test_output=errors diff --git a/.github/workflows/build_scenarios.yml b/.github/workflows/build_scenarios.yml new file mode 100644 index 0000000..e83e6da --- /dev/null +++ b/.github/workflows/build_scenarios.yml @@ -0,0 +1,37 @@ +# ******************************************************************************* +# Copyright (c) 2025 Contributors to the Eclipse Foundation +# +# See the NOTICE file(s) distributed with this work for additional +# information regarding copyright ownership. +# +# This program and the accompanying materials are made available under the +# terms of the Apache License Version 2.0 which is available at +# https://www.apache.org/licenses/LICENSE-2.0 +# +# SPDX-License-Identifier: Apache-2.0 +# ******************************************************************************* +name: Build and test scenarios + +on: + pull_request: + types: [opened, reopened, synchronize] + +jobs: + scenarios-build: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Setup Bazel + uses: bazel-contrib/setup-bazel@0.15.0 + with: + bazelisk-version: 1.26.0 # newest LTS before 1 Jun 2025 + + - name: Run build + run: | + bazel build //... + + - name: Run tests + run: | + bazel test //... diff --git a/.github/workflows/fomat_and_test.yml b/.github/workflows/fomat_and_test.yml new file mode 100644 index 0000000..f95788b --- /dev/null +++ b/.github/workflows/fomat_and_test.yml @@ -0,0 +1,68 @@ +# ******************************************************************************* +# Copyright (c) 2025 Contributors to the Eclipse Foundation +# +# See the NOTICE file(s) distributed with this work for additional +# information regarding copyright ownership. +# +# This program and the accompanying materials are made available under the +# terms of the Apache License Version 2.0 which is available at +# https://www.apache.org/licenses/LICENSE-2.0 +# +# SPDX-License-Identifier: Apache-2.0 +# ******************************************************************************* +name: Format and Internal Tests of Utils + +on: + pull_request: + types: [opened, reopened, synchronize] + +jobs: + lint: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: '3.12' + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -e ".[dev]" || true + + - name: Check formatting with Ruff + run: ruff check . + + test: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Setup Bazel + uses: bazel-contrib/setup-bazel@0.15.0 + with: + bazelisk-version: 1.26.0 # newest LTS before 1 Jun 2025 + + - name: Install Rust (Cargo) + uses: actions-rs/toolchain@v1 + with: + toolchain: stable + profile: minimal + components: cargo + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: '3.12' + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -e ".[dev]" || true + + - name: Run tests with pytest + run: pytest tests -v diff --git a/MODULE.bazel b/MODULE.bazel index c169690..1a2e3c8 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -17,6 +17,7 @@ module( name = "score_test_scenarios", version = "0.3.0", + compatibility_level = 0, ) # Starlark language server @@ -61,15 +62,4 @@ crate.from_cargo( use_repo(crate, "test_scenarios_rust_crates") # C++ base libs. -archive_override( - module_name = "rules_boost", - strip_prefix = "rules_boost-master", - urls = ["https://github.com/nelhage/rules_boost/archive/refs/heads/master.tar.gz"], -) - -bazel_dep(name = "score-baselibs", version = "0.0.0") -git_override( - module_name = "score-baselibs", - commit = "f0a394a602986ddf7abac6a238b9d44535a4b597", - remote = "https://github.com/eclipse-score/baselibs.git", -) +bazel_dep(name = "score_baselibs", version = "0.1.2") diff --git a/pyproject.toml b/pyproject.toml index 4298daa..9d4faf0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [project] name = "testing-utils" version = "0.3.0" -dependencies = ["pytest==8.4.1", "pytest-html==4.1.1", "pytest-repeat==0.9.4"] +dependencies = ["pytest>=8.3.5", "pytest-html>=4.1.1", "pytest-repeat>=0.9.4"] requires-python = ">=3.12" authors = [ { name = "Igor Ostrowski", email = "igor.ostrowski.ext@qorix.ai" }, diff --git a/test_scenarios_cpp/BUILD b/test_scenarios_cpp/BUILD index 73d7105..5dce066 100644 --- a/test_scenarios_cpp/BUILD +++ b/test_scenarios_cpp/BUILD @@ -35,7 +35,7 @@ cc_library( ], includes = ["include/"], visibility = ["//visibility:public"], - deps = ["@score-baselibs//score/json:json_parser"], + deps = ["@score_baselibs//score/json:json_parser"], ) cc_test( diff --git a/test_scenarios_rust/Cargo.lock b/test_scenarios_rust/Cargo.lock index 0b71c46..397e1ee 100644 --- a/test_scenarios_rust/Cargo.lock +++ b/test_scenarios_rust/Cargo.lock @@ -144,7 +144,7 @@ dependencies = [ [[package]] name = "test_scenarios_rust" -version = "0.2.9" +version = "0.3.0" dependencies = [ "tracing", "tracing-subscriber",