-
Notifications
You must be signed in to change notification settings - Fork 0
96 lines (90 loc) · 3.45 KB
/
Copy pathtests.yml
File metadata and controls
96 lines (90 loc) · 3.45 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
86
87
88
89
90
91
92
93
94
95
96
name: tests
on:
push:
branches:
- "**"
pull_request:
workflow_dispatch:
permissions:
contents: read
concurrency:
group: tests-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
unit:
runs-on: ubuntu-24.04
strategy:
matrix:
python-version: ["3.10", "3.12"]
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
- name: Check out the compatible pg_diag source
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
with:
repository: O2eg/pg_diag
path: .ci-components/pg_diag
- uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6
with:
python-version: ${{ matrix.python-version }}
- run: python -m pip install --editable .ci-components/pg_diag --editable '.[dev]'
- run: ruff check --exclude .ci-components .
- run: ruff format --check --exclude .ci-components .
- run: python -m pytest -q
distribution:
runs-on: ubuntu-24.04
needs: unit
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
- name: Check out the compatible pg_diag source
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
with:
repository: O2eg/pg_diag
path: .ci-components/pg_diag
- uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6
with:
python-version: "3.12"
- run: python -m pip install 'build>=1.2,<2' 'twine>=6,<7'
- run: python -m build
- run: python -m twine check dist/*
- name: Smoke-test built wheel
shell: bash
run: |
python -m venv "${RUNNER_TEMP}/pg-perf-bench-wheel-smoke"
"${RUNNER_TEMP}/pg-perf-bench-wheel-smoke/bin/python" -m pip install \
--editable .ci-components/pg_diag
"${RUNNER_TEMP}/pg-perf-bench-wheel-smoke/bin/python" -m pip install dist/*.whl
"${RUNNER_TEMP}/pg-perf-bench-wheel-smoke/bin/pg-perf-bench" --version
"${RUNNER_TEMP}/pg-perf-bench-wheel-smoke/bin/pg-perf-bench" validate
"${RUNNER_TEMP}/pg-perf-bench-wheel-smoke/bin/pg-perf-bench" \
--machine --component-capabilities
postgres-18:
if: github.event_name == 'workflow_dispatch'
runs-on: ubuntu-24.04
needs: unit
timeout-minutes: 120
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
- name: Check out the compatible pg_diag source
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
with:
repository: O2eg/pg_diag
path: .ci-components/pg_diag
- name: Check out the compatible pg_stand source
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
with:
repository: O2eg/pg_stand
path: .ci-components/pg_stand
- uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6
with:
python-version: "3.12"
- run: |
python -m pip install \
--editable .ci-components/pg_diag \
--editable .ci-components/pg_stand \
--editable '.[dev]'
- name: Run PostgreSQL 18 pg_stand integration
env:
PG_PERF_BENCH_PG_STAND_INTEGRATION: "1"
PG_STAND_BIN: pg-stand
PYTHONDONTWRITEBYTECODE: "1"
run: python -m pytest -q -m integration tests/integration/test_pg_stand_smoke.py