-
-
Notifications
You must be signed in to change notification settings - Fork 7
136 lines (112 loc) · 3.25 KB
/
e2e-tests.yaml
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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
name: Tests - E2E
on:
push:
branches:
- main # adjust this to match your main branch name
workflow_dispatch:
workflow_call:
concurrency:
group: e2e-tests
cancel-in-progress: true
jobs:
build-test:
strategy:
max-parallel: 99
matrix:
os: [ubuntu-latest, macos-latest]
python-version: ["3.9", "3.12"]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
version: "0.4.25"
- name: Install Just
uses: extractions/setup-just@v2
with:
just-version: "1.36.0"
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Pre-test checks
run: |
uv --version
jq --version
just --version
curl --version
- name: Run Build & Install
run: |
just install
- name: Check installed tools
run: |
uv tool list
- name: Run SyftBox Debug
run: |
syftbox version
syftbox debug
syftbox client --help
syftbox server --help
e2e-test:
strategy:
max-parallel: 99
matrix:
e2e-test: [
"basic_aggregator",
"model_aggregator",
"aggregator_with_local_training",
# "fl_model_training",
]
python-version: ["3.9", "3.12"]
os: [ubuntu-latest, macos-latest]
# runner: [syftbox-sh-linux-x64, scaleway-macOS-arm64]
fail-fast: false
# runs-on: ${{ matrix.runner }}
runs-on: ${{ matrix.os }}
steps:
- name: Free Disk Space
run: |
sudo rm -rf /Users/runner/Library/Android/sdk || true
sudo rm -rf /usr/local/lib/android || true
sudo rm -rf /usr/share/dotnet || true
sudo rm -rf /opt/ghc || true
sudo rm -rf /usr/local/.ghcup || true
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
version: "0.4.25"
- name: Install Just
uses: extractions/setup-just@v2
with:
just-version: "1.36.0"
- name: "Setup jq"
uses: dcarbone/install-jq-action@v3
with:
version: "1.7"
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Pre-test checks
run: |
uv --version
jq --version
just --version
curl --version
- name: Run E2E Test for '${{ matrix.e2e-test }}'
run: |
just reset
just test-e2e ${{ matrix.e2e-test }}
- name: Cleanup unnecessary files
if: ${{ failure() }}
run: |
find . -type f -name "Icon*" -exec rm -f {} \;
find . -type f -name "syftbox.pid" -exec rm -f {} \;
- name: Upload logs & client/server state
if: failure()
uses: actions/upload-artifact@v4
with:
name: e2e-${{ matrix.e2e-test }}-${{ runner.os }}-${{ matrix.python-version }}
path: .e2e/${{ matrix.e2e-test }}