Skip to content

Commit

Permalink
fix(ci): pre-pull compose images to avoid timeouts
Browse files Browse the repository at this point in the history
Signed-off-by: Victor Adossi <vadossi@cosmonic.com>
  • Loading branch information
vados-cosmonic committed Oct 4, 2024
1 parent d4df73e commit 32db6b9
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 8 deletions.
17 changes: 12 additions & 5 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ jobs:
fail-fast: false
matrix:
# TODO: Re-enable the multitenant and upgrades tests in followup to #247
# e2e_test: [e2e_multiple_hosts, e2e_multitenant, e2e_upgrades]
e2e_test: [e2e_multiple_hosts, e2e_upgrades]
# test: [e2e_multiple_hosts, e2e_multitenant, e2e_upgrades]
test: [e2e_multiple_hosts, e2e_upgrades]

steps:
- uses: actions/checkout@v4
Expand All @@ -30,19 +30,26 @@ jobs:
with:
key: 'ubuntu-22.04-rust-cache'

# If the test uses a docker compose file, pre-emptively pull images used in docker compose
- name: Pull images for test ${{ matrix.test }}
shell: bash
run: |
export DOCKER_COMPOSE_FILE=tests/docker-compose-${{ matrix.test }}.yaml;
[[ -f "$DOCKER_COMPOSE_FILE" ]] && docker compose -f $DOCKER_COMPOSE_FILE pull;
# Run e2e tests in a matrix for efficiency
- name: Run tests ${{ matrix.e2e_test }}
- name: Run tests ${{ matrix.test }}
id: test
env:
WADM_E2E_TEST: ${{ matrix.e2e_test }}
WADM_E2E_TEST: ${{ matrix.test }}
run: make test-individual-e2e

# if the previous step fails, upload logs
- name: Upload logs for debugging
uses: actions/upload-artifact@v4
if: ${{ failure() && steps.test.outcome == 'failure' }}
with:
name: e2e-logs-${{ matrix.e2e_test }}
name: e2e-logs-${{ matrix.test }}
path: ./tests/e2e_log/*
# Be nice and only retain the logs for 7 days
retention-days: 7
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion tests/e2e_multiple_hosts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ use crate::{
};

const MANIFESTS_PATH: &str = "tests/fixtures/manifests";
const DOCKER_COMPOSE_FILE: &str = "tests/docker-compose-e2e.yaml";
const DOCKER_COMPOSE_FILE: &str = "tests/docker-compose-e2e_multiple_hosts.yaml";
const BLOBSTORE_FS_IMAGE_REF: &str = "ghcr.io/wasmcloud/blobstore-fs:0.6.0";
const BLOBSTORE_FS_PROVIDER_ID: &str = "fileserver";
const BLOBBY_IMAGE_REF: &str = "ghcr.io/wasmcloud/components/blobby-rust:0.4.0";
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e_multitenant.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
// use crate::e2e::check_status;

// const MANIFESTS_PATH: &str = "tests/fixtures/manifests";
// const DOCKER_COMPOSE_FILE: &str = "tests/docker-compose-e2e-multitenant.yaml";
// const DOCKER_COMPOSE_FILE: &str = "tests/docker-compose-e2e_multitenant.yaml";

// const MESSAGE_PUB_ACTOR_ID: &str = "MC3QONHYH3FY4KYFCOSVJWIDJG4WA2PVD6FHKR7FFT457GVUTZJYR2TJ";
// const NATS_PROVIDER_ID: &str = "VADNMSIML2XGO2X4TPIONTIC55R2UUQGPPDZPAVSC2QD7E76CR77SPW7";
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e_upgrades.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ use e2e::{
use helpers::{HELLO_COMPONENT_ID, HELLO_IMAGE_REF, HTTP_SERVER_COMPONENT_ID};

const MANIFESTS_PATH: &str = "tests/fixtures/manifests";
const DOCKER_COMPOSE_FILE: &str = "tests/docker-compose-e2e-upgrade.yaml";
const DOCKER_COMPOSE_FILE: &str = "tests/docker-compose-e2e_upgrades.yaml";
const KEYVALUE_REDIS_COMPONENT_ID: &str = "keyvalue_redis";
const DOG_FETCHER_GENERATED_ID: &str = "dog_fetcher";
const KVCOUNTER_GENERATED_ID: &str = "kvcounter";
Expand Down

0 comments on commit 32db6b9

Please sign in to comment.