forked from pnc/less-lethal
-
Notifications
You must be signed in to change notification settings - Fork 0
80 lines (69 loc) · 2.38 KB
/
ci.yml
File metadata and controls
80 lines (69 loc) · 2.38 KB
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
name: CI
on:
push:
branches: [main]
pull_request:
schedule:
- cron: "0 6 * * 1" # Weekly Monday 6am UTC — catches upstream Debian image drift
jobs:
unit-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Install uv
run: |
curl -fL https://github.com/astral-sh/uv/releases/latest/download/uv-x86_64-unknown-linux-gnu.tar.gz \
| tar xz -C /usr/local/bin --strip-components=1
- run: uv run pytest tests/test_filter.py -v
e2e-linux:
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@v5
- name: Install uv
run: |
curl -fL https://github.com/astral-sh/uv/releases/latest/download/uv-x86_64-unknown-linux-gnu.tar.gz \
| tar xz -C /usr/local/bin --strip-components=1
- name: Install QEMU and dependencies
run: |
sudo apt-get update -qq
sudo apt-get install -y --no-install-recommends \
qemu-system-x86 qemu-utils genisoimage netcat-openbsd
- name: Install mitmproxy
run: uv tool install mitmproxy
- name: Run e2e tests
run: uv run pytest tests/test_e2e.py -v -s
env:
VM_STATE_DIR: ${{ runner.temp }}/vm-state
- name: Upload logs on failure
if: failure()
uses: actions/upload-artifact@v5
with:
name: e2e-linux-logs
path: |
${{ runner.temp }}/vm-state/console.log
${{ runner.temp }}/vm-state/mitmdump.log
e2e-macos:
runs-on: macos-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@v5
- name: Install uv
run: |
curl -fL https://github.com/astral-sh/uv/releases/latest/download/uv-aarch64-apple-darwin.tar.gz \
| tar xz -C /usr/local/bin --strip-components=1
- name: Install QEMU and mitmproxy
run: brew install qemu mitmproxy
- name: Run e2e tests
run: uv run pytest tests/test_e2e.py -v -s
env:
VM_STATE_DIR: ${{ runner.temp }}/vm-state
QEMU_ACCEL: tcg # HVF is unavailable on GitHub-hosted macOS runners
- name: Upload logs on failure
if: failure()
uses: actions/upload-artifact@v5
with:
name: e2e-macos-logs
path: |
${{ runner.temp }}/vm-state/console.log
${{ runner.temp }}/vm-state/mitmdump.log