Skip to content

Commit 6398dc1

Browse files
committed
ci: [torrust#634] run E2E tests in the testing workflow
1 parent a295fc4 commit 6398dc1

File tree

2 files changed

+50
-1
lines changed

2 files changed

+50
-1
lines changed

.github/workflows/testing.yaml

+49
Original file line numberDiff line numberDiff line change
@@ -110,3 +110,52 @@ jobs:
110110
- id: test
111111
name: Run Unit Tests
112112
run: cargo test --tests --benches --examples --workspace --all-targets --all-features
113+
114+
e2e:
115+
name: E2E
116+
runs-on: ubuntu-latest
117+
needs: unit
118+
119+
strategy:
120+
matrix:
121+
toolchain: [nightly]
122+
123+
steps:
124+
- id: setup-docker
125+
name: Setup Toolchain
126+
uses: docker/setup-buildx-action@v3
127+
128+
- id: build
129+
name: Build
130+
uses: docker/build-push-action@v5
131+
with:
132+
file: ./Containerfile
133+
push: false
134+
load: true
135+
target: release
136+
tags: torrust-tracker:local
137+
cache-from: type=gha
138+
cache-to: type=gha
139+
140+
- id: inspect
141+
name: Inspect
142+
run: docker image inspect torrust-tracker:local
143+
144+
- id: setup-rust
145+
name: Setup Toolchain
146+
uses: dtolnay/rust-toolchain@stable
147+
with:
148+
toolchain: ${{ matrix.toolchain }}
149+
components: llvm-tools-preview
150+
151+
- id: cache
152+
name: Enable Job Cache
153+
uses: Swatinem/rust-cache@v2
154+
155+
- id: checkout
156+
name: Checkout Repository
157+
uses: actions/checkout@v4
158+
159+
- id: test
160+
name: Run E2E Tests
161+
run: cargo run --bin e2e_tests_runner

src/e2e/runner.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ pub fn run() {
2828
2929
*/
3030

31-
//Docker::build("./Containerfile", "local").expect("A tracker local docker image should be built");
31+
Docker::build("./Containerfile", "local").expect("A tracker local docker image should be built");
3232

3333
println!(
3434
"Current dir: {:?}",

0 commit comments

Comments
 (0)