-
Notifications
You must be signed in to change notification settings - Fork 5
85 lines (72 loc) · 2.48 KB
/
blocking-tests.yml
File metadata and controls
85 lines (72 loc) · 2.48 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
81
82
83
84
85
name: Blocking Tests
concurrency:
group: blocking-tests-${{ github.ref }}
cancel-in-progress: true
on:
pull_request:
branches:
- main
push:
branches:
- main
env:
PYTHON_PATH: ./
jobs:
blocking-tests:
name: Python ${{ matrix.python }}
runs-on: ubuntu-latest
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
python: ['3.10', '3.11', '3.12', '3.13']
steps:
- uses: actions/checkout@v6
- name: Setup CycleTLS (Go build)
uses: ./.github/actions/setup-cycletls
- name: Setup uv
uses: astral-sh/setup-uv@v7
with:
python-version: ${{ matrix.python }}
enable-cache: true
- name: Install dependencies
run: uv sync --locked --all-extras --dev
- name: Checkout Danny-Dasilva/tlsfingerprint.com
uses: actions/checkout@v4
with:
repository: Danny-Dasilva/tlsfingerprint.com
ref: master
path: .tlsfingerprint-server
- name: Generate TLS certificates and config
working-directory: .tlsfingerprint-server
run: |
mkdir -p certs
openssl req -x509 -newkey rsa:4096 \
-keyout certs/key.pem \
-out certs/chain.pem \
-sha256 -days 365 -nodes \
-subj "/CN=localhost" \
-addext "subjectAltName=IP:127.0.0.1,DNS:localhost"
jq '.log_to_db = false | .mongo_url = "" | .device = ""' \
config.example.json > config.json
cat /etc/ssl/certs/ca-certificates.crt certs/chain.pem > /tmp/combined-test-cas.crt
- name: Build and start tlsfingerprint.com server
working-directory: .tlsfingerprint-server
run: |
docker compose up -d --build
echo "Waiting for tlsfingerprint.com server to become ready..."
if ! timeout 90 bash -c 'until curl -sk --max-time 3 https://localhost/api/clean -o /dev/null; do sleep 2; done'; then
echo "Server did not become ready in time. Container logs:"
docker compose logs
exit 1
fi
echo "tlsfingerprint.com server is ready."
- name: Run blocking tests
env:
TLSFP_URL: https://localhost
SSL_CERT_FILE: /tmp/combined-test-cas.crt
run: uv run pytest -v --color=yes -m "blocking" tests/
- name: Tear down tlsfingerprint.com server
if: always()
working-directory: .tlsfingerprint-server
run: docker compose down -v || true