-
Notifications
You must be signed in to change notification settings - Fork 28
53 lines (45 loc) · 1.47 KB
/
e2e.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
name: e2e Tests Wadm
on:
pull_request:
branches:
- main
jobs:
test:
name: e2e
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
test: [e2e_multiple_hosts, e2e_upgrades, e2e_shared]
steps:
- uses: actions/checkout@v4
- name: Install latest Rust stable toolchain
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
components: clippy, rustfmt
# Cache: rust
- uses: Swatinem/rust-cache@v2
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.test }}
id: test
env:
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.test }}
path: ./tests/e2e_log/*
# Be nice and only retain the logs for 7 days
retention-days: 7