Skip to content
Open
Show file tree
Hide file tree
Changes from 15 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 42 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -183,16 +183,56 @@ jobs:
kvm-smoke-tests:
name: KVM Smoke Tests
runs-on: ubuntu-latest
timeout-minutes: 15
timeout-minutes: 30
needs: docker-build
if: ${{ always() && (github.event_name != 'pull_request' || needs.docker-build.result == 'success') }}
permissions:
contents: read
packages: read
env:
SCCACHE_GHA_ENABLED: "true"
RUSTC_WRAPPER: "sccache"
steps:
- uses: actions/checkout@v5
- uses: dtolnay/rust-toolchain@stable
- uses: mozilla-actions/sccache-action@v0.0.9
- name: Compute image registries
if: github.event_name == 'pull_request'
shell: bash
run: |
set -euo pipefail
owner_lc="$(printf '%s' '${{ github.repository_owner }}' | tr '[:upper:]' '[:lower:]')"
ci_registry="ghcr.io/${owner_lc}"
code_registry="$(jq -r '.registry' docker/images.json)"
if [ -z "$code_registry" ] || [ "$code_registry" = "null" ]; then
echo "docker/images.json registry is missing" >&2
exit 1
fi
code_registry="${code_registry%/}"
echo "CI_IMAGE_REGISTRY=${ci_registry}" >> "$GITHUB_ENV"
echo "CODE_IMAGE_REGISTRY=${code_registry}" >> "$GITHUB_ENV"
- uses: docker/login-action@v3
if: github.event_name == 'pull_request'
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Pull and retag images for KVM smoke test
if: github.event_name == 'pull_request'
shell: bash
run: |
SOURCE_IMAGE_REGISTRY="$CI_IMAGE_REGISTRY" \
TARGET_IMAGE_REGISTRY="$CODE_IMAGE_REGISTRY" \
SOURCE_IMAGE_TAG="$GITHUB_SHA" \
./.github/scripts/prepare_prebuilt_images.sh
- name: Run KVM smoke test
run: cargo test -p amber-cli --test kvm_smoke -- --ignored --nocapture --test-threads=1
shell: bash
run: |
set -euo pipefail
if [ "${{ github.event_name }}" = "pull_request" ]; then
export AMBER_TEST_USE_PREBUILT_IMAGES=1
fi
cargo test -p amber-cli --test kvm_smoke -- --ignored --nocapture --test-threads=1

kubernetes-tests:
name: Kubernetes Reporter Tests
Expand Down
61 changes: 61 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ members = [
"runtime/proxy",
"runtime/provisioner",
"runtime/router",
"runtime/site-controller",
]
resolver = "2"

Expand All @@ -30,6 +31,7 @@ amber-proxy = { path = "runtime/proxy" }
amber-resolver = { path = "compiler/resolver" }
amber-router = { path = "runtime/router" }
amber-scenario = { path = "compiler/scenario" }
amber-site-controller = { path = "runtime/site-controller" }
amber-template = { path = "compiler/template" }
base64 = "0.22.1"
futures = "0.3.31"
Expand Down
3 changes: 3 additions & 0 deletions cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,14 @@ path = "src/main.rs"
amber-compiler = { workspace = true }
amber-config = { workspace = true }
amber-helper = { path = "../runtime/helper" }
amber-images = { workspace = true }
amber-manifest = { workspace = true }
amber-mesh = { workspace = true }
amber-proxy = { workspace = true }
amber-resolver = { workspace = true }
amber-router = { workspace = true }
amber-scenario = { workspace = true }
amber-site-controller = { workspace = true }
amber-template = { workspace = true }
axum = { version = "0.8.6", features = ["http1", "json", "tokio"] }
base64 = { workspace = true }
Expand Down Expand Up @@ -51,3 +53,4 @@ serde_yaml = { workspace = true }
similar = "2.7.0"
strip-ansi-escapes = "0.2"
tempfile = { workspace = true }
time = { version = "0.3.44", features = ["parsing"] }
Loading
Loading