-
Notifications
You must be signed in to change notification settings - Fork 5
73 lines (61 loc) · 2.27 KB
/
e2e-python.yml
File metadata and controls
73 lines (61 loc) · 2.27 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
name: E2E Tests (Python)
on:
push:
branches: [main]
pull_request:
branches: [main]
permissions:
contents: read
jobs:
e2e:
strategy:
matrix:
os: [ubuntu-latest, macos-latest] # fence (sandbox) supported platforms
runs-on: ${{ matrix.os }}
steps:
- name: Checkout CLI
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
- name: Set up Go
uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5
with:
go-version-file: go.mod
- name: Install Linux sandbox dependencies
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y bubblewrap socat uidmap
# Configure subuid/subgid for the runner user (required for unprivileged user namespaces)
echo "$(whoami):100000:65536" | sudo tee -a /etc/subuid
echo "$(whoami):100000:65536" | sudo tee -a /etc/subgid
# Make bwrap setuid so it can create namespaces as non-root user
sudo chmod u+s $(which bwrap)
- name: Build CLI
run: make build
- name: Set up Python
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
with:
python-version: "3.12"
- name: Clone drift-python-demo
run: git clone https://github.com/Use-Tusk/drift-python-demo.git ../drift-python-demo
- name: Install demo dependencies
working-directory: ../drift-python-demo
run: |
python -m venv venv
source venv/bin/activate
pip install -r requirements.txt
- name: Run Python E2E tests Non-Interactive
working-directory: ../drift-python-demo
run: |
source venv/bin/activate
$GITHUB_WORKSPACE/tusk drift run --print
# Exits non-zero if any test has deviations
# CI environments don't have a TTY, so the CLI falls back to headless mode by default.
# TUSK_TUI_CI_MODE=1 forces TUI mode, skips size warning, and auto-exits on completion.
- name: Run E2E tests Interactive
timeout-minutes: 2
working-directory: ../drift-python-demo
env:
TUSK_TUI_CI_MODE: "1"
run: |
source venv/bin/activate
$GITHUB_WORKSPACE/tusk drift run