-
Notifications
You must be signed in to change notification settings - Fork 1
121 lines (99 loc) · 2.96 KB
/
test-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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
name: Test E2E
on:
pull_request:
branches: [main]
paths:
- "**"
- "!/*.md"
- "!/**.md"
concurrency:
group: "${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}"
cancel-in-progress: true
jobs:
test_e2e:
name: E2E Tests
runs-on: ubuntu-latest
env:
RUST_BACKTRACE: full
RUST_LOG: debug
RUSTV: stable
TARGET: x86_64-unknown-linux-musl
steps:
- name: Checkout source code
uses: actions/checkout@v3
- name: Install musl-tools
run: |
set -ex
sudo apt-get update
sudo apt-get install -y musl-tools
- name: Create fluvio k3d Cluster
uses: AbsaOSS/[email protected]
with:
cluster-name: "fluvio"
args: --timeout 5m
- name: Ensure k3d cluster is ready
run: |
sleep 5
./actions/k3d-check.sh
- name: Build, Start and Stop Containers
run: |
docker compose up --build -d
docker compose down
- name: Setup Retention Configuration
run: |
sudo rm .graphite/conf/storage-schemas.conf
sudo cp tests/conf/storage-schemas.conf .graphite/conf/storage-schemas.conf
- name: Restart Container to use Configuration
run: docker compose up -d --build
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
target: x86_64-unknown-linux-musl
toolchain: stable
profile: minimal
- name: Setup Rust Cache
uses: Swatinem/rust-cache@v2
- name: Install Fluvio Local Cluster
timeout-minutes: 10
uses: infinyon/fluvio@master
with:
cluster-type: k3d
version: stable
- name: Install Just
uses: extractions/setup-just@v1
with:
just-version: '1.13.0'
- name: Check Fluvio Installation
run: just test_fluvio_install
- name: Install Fluvio CDK
run: fluvio install cdk --develop
- name: Build Connector
run: cdk build --target x86_64-unknown-linux-musl
- name: Setup BATS
uses: mig4/setup-bats@v1
- name: Runs E2E tests
timeout-minutes: 5
run: just test_e2e
- name: Run diagnostics
if: ${{ !success() }}
timeout-minutes: 5
run: fluvio cluster diagnostics
- name: Upload diagnostics
uses: actions/upload-artifact@v3
timeout-minutes: 5
if: ${{ !success() }}
with:
name: diagnostics_${{ matrix.connector-name }}
path: diagnostics*.gz
retention-days: 5
- name: Upload diagnostics
uses: actions/upload-artifact@v3
timeout-minutes: 5
if: ${{ !success() }}
with:
name: conn_logs_${{ matrix.connector-name }}
path: graphite-sink.log
retention-days: 5
- name: Stop containers
if: always()
run: docker compose down