Repository navigation
76 lines (76 loc) · 2.61 KB
/
Copy pathclient-part-bytes.yml
File metadata and controls
76 lines (76 loc) · 2.61 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
name: Client chunk size regressions
on:
push:
paths:
- '.github/workflows/client-part-bytes.yml'
- 'src/msg/client.py'
- 'tests/test_client*.py'
- 'tests/read_only_evidence.py'
pull_request:
paths:
- '.github/workflows/client-part-bytes.yml'
- 'src/msg/client.py'
- 'tests/test_client*.py'
- 'tests/read_only_evidence.py'
workflow_dispatch:
permissions:
contents: read
concurrency:
group: client-part-bytes-${{ github.event.pull_request.head.repo.full_name || github.repository }}-${{ github.head_ref || github.ref_name }}
cancel-in-progress: true
jobs:
regression:
runs-on: ubuntu-latest
timeout-minutes: 10
services:
postgres:
image: postgres:16
env:
POSTGRES_USER: msgtest
POSTGRES_PASSWORD: msgtest
POSTGRES_DB: postgres
ports:
- 5432:5432
options: >-
--health-cmd "pg_isready -U msgtest"
--health-interval 10s --health-timeout 5s --health-retries 5
env:
MSG_TEST_POSTGRES_URL_TEMPLATE: postgresql://msgtest:msgtest@127.0.0.1:5432/{database}
steps:
- uses: actions/checkout@v7
with:
persist-credentials: false
- uses: actions/setup-python@v7
with:
python-version: '3.15'
allow-prereleases: true
cache: pip
- name: Record exact source identity
run: |
mkdir -p artifacts
python - <<'PY'
import json, os, platform, subprocess
from pathlib import Path
def git(*args):
return subprocess.check_output(['git', *args], text=True).strip()
Path('artifacts/source.json').write_text(json.dumps({
'commit': git('rev-parse', 'HEAD'), 'tree': git('rev-parse', 'HEAD^{tree}'),
'run_id': os.environ['GITHUB_RUN_ID'], 'attempt': os.environ['GITHUB_RUN_ATTEMPT'],
'python': platform.python_version()}, indent=2) + '\n')
PY
- name: Install real cryptographic and database test dependencies
run: |
sudo apt-get update -qq
sudo env NEEDRESTART_MODE=l apt-get install -y -qq age libpcsclite-dev swig
python -m pip install -e '.[dev]'
- name: Run invalid-size and cross-protocol resume regressions
run: >-
python -m pytest -q
tests/test_client_part_bytes.py tests/test_client.py
--junitxml=artifacts/client-part-bytes.xml
- uses: actions/upload-artifact@v7.0.1
if: always()
with:
name: client-part-bytes-evidence
path: artifacts/
if-no-files-found: error