Skip to content

Commit 3bab43a

Browse files
committed
No longer run e2e tests in Docker
Signed-off-by: Ryan Levick <[email protected]>
1 parent 0b5f3ff commit 3bab43a

File tree

6 files changed

+33
-255
lines changed

6 files changed

+33
-255
lines changed

.github/workflows/build.yml

Lines changed: 23 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -197,23 +197,34 @@ jobs:
197197
# run on a larger runner for more SSD/resource access
198198
runs-on: ubuntu-22.04-4core-spin
199199
if: ${{ github.repository_owner == 'fermyon' }}
200-
needs: build-rust-ubuntu
201200
steps:
202201
- uses: actions/checkout@v3
203202

204-
- name: Retrieve saved Spin Binary
205-
uses: actions/download-artifact@v3
203+
# Install all the toolchain dependencies
204+
- name: Install Rust wasm target
205+
run: rustup target add wasm32-wasi && rustup target add wasm32-unknown-unknown
206+
- uses: goto-bus-stop/setup-zig@v2
207+
- uses: actions/setup-go@v4
206208
with:
207-
name: spin-ubuntu-latest
208-
path: target/release/
209-
210-
- name: Build e2e tests image
209+
go-version: '1.20.1'
210+
- uses: acifani/setup-tinygo@v2
211+
with:
212+
tinygo-version: '0.27.0'
213+
- uses: actions/setup-node@v3
214+
with:
215+
node-version: '16.x'
216+
- name: Install Swift
217+
run: |
218+
wget https://github.com/swiftwasm/swift/releases/download/swift-wasm-5.8-SNAPSHOT-2023-02-24-a/swift-wasm-5.8-SNAPSHOT-2023-02-24-a-ubuntu22.04_x86_64.tar.gz
219+
tar -xf swift-wasm-5.8-SNAPSHOT-2023-02-24-a-ubuntu22.04_x86_64.tar.gz
220+
echo "$PWD/swift-wasm-5.8-SNAPSHOT-2023-02-24-a/usr/bin" >> $GITHUB_PATH
221+
- name: Install Grain
211222
run: |
212-
export E2E_FETCH_SPIN=false
213-
make build-test-spin-up
223+
wget https://github.com/grain-lang/grain/releases/download/grain-v0.5.4/grain-linux-x64
224+
chmod +x grain-linux-x64
225+
mv grain-linux-x64 grain
226+
echo "$PWD" >> $GITHUB_PATH
214227
215228
- name: Run e2e tests
216229
run: |
217-
chmod +x `pwd`/target/release/spin
218-
export E2E_VOLUME_MOUNT="-v `pwd`/target/release/spin:/usr/local/bin/spin"
219-
make run-test-spin-up
230+
make test-spin-up

Makefile

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -99,17 +99,8 @@ test-integration:
9999
$(LOG_LEVEL_VAR) cargo test --test integration --no-fail-fast -- --skip spinup_tests --skip cloud_tests --nocapture
100100

101101
.PHONY: test-spin-up
102-
test-spin-up: build-test-spin-up run-test-spin-up
103-
104-
.PHONY: build-test-spin-up
105-
build-test-spin-up:
106-
docker build -t spin-e2e-tests --build-arg FETCH_SPIN=$(E2E_FETCH_SPIN) --build-arg BUILD_SPIN=$(E2E_BUILD_SPIN) -f $(E2E_TESTS_DOCKERFILE) .
107-
108-
.PHONY: run-test-spin-up
109-
run-test-spin-up:
110-
REDIS_IMAGE=$(REDIS_IMAGE) MYSQL_IMAGE=$(MYSQL_IMAGE) POSTGRES_IMAGE=$(POSTGRES_IMAGE) \
111-
BUILD_SPIN=$(E2E_BUILD_SPIN) \
112-
docker compose -f e2e-tests-docker-compose.yml run $(E2E_SPIN_RELEASE_VOLUME_MOUNT) $(E2E_SPIN_DEBUG_VOLUME_MOUNT) e2e-tests
102+
test-spin-up:
103+
cargo test --release spinup_tests --no-default-features --features e2e-tests --no-fail-fast -- --nocapture
113104

114105
.PHONY: test-sdk-go
115106
test-sdk-go:

e2e-tests-aarch64.Dockerfile

Lines changed: 0 additions & 82 deletions
This file was deleted.

e2e-tests-docker-compose.yml

Lines changed: 0 additions & 61 deletions
This file was deleted.

e2e-tests.Dockerfile

Lines changed: 0 additions & 88 deletions
This file was deleted.

tests/testcases/mod.rs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,8 +245,15 @@ pub fn bootstrap_smoke_test(
245245
.args(new_app_args(&mut env)?);
246246
env.run_in(&mut new_app)?;
247247
prebuild_hook(&mut env)?;
248+
let path = std::env::var("PATH").unwrap_or_default();
249+
let path = if path.is_empty() {
250+
spin_binary().parent().unwrap().display().to_string()
251+
} else {
252+
format!("{path}:{}", spin_binary().parent().unwrap().display())
253+
};
248254
let mut build = std::process::Command::new(spin_binary());
249-
build.args(["build"]);
255+
// Ensure `spin` is on the path
256+
build.env("PATH", path).args(["build"]);
250257
env.run_in(&mut build)?;
251258
let spin_up_args = spin_up_args(&mut env)?;
252259
let spin = testing_framework::Spin::start(&spin_binary(), &env, spin_up_args, spin_mode)?;

0 commit comments

Comments
 (0)