Repository navigation
145 lines (140 loc) · 5.83 KB
/
Copy pathtests.yml
File metadata and controls
145 lines (140 loc) · 5.83 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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
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:
fail-fast: false
matrix:
python-version: ["3.11", "3.12"]
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
- name: Check out pg_maker sources
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
with:
repository: O2eg/pg_maker
path: .ci-components/pg_maker
- name: Check out pg_logical_repl sources
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
with:
repository: O2eg/pg_logical_repl
path: .ci-components/pg_logical_repl
- name: Check out component sources
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
with:
repository: O2eg/pg_configurator
path: .ci-components/pg_configurator
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
with:
repository: O2eg/pg_converter
path: .ci-components/pg_converter
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
with:
repository: O2eg/pg_diag
path: .ci-components/pg_diag
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
with:
repository: O2eg/pg_perf_bench
path: .ci-components/pg_perf_bench
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
with:
repository: O2eg/pg_stand
path: .ci-components/pg_stand
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
with:
repository: O2eg/pg_workload
path: .ci-components/pg_workload
- uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6
with:
python-version: ${{ matrix.python-version }}
- name: Install pg_play and all component sources
run: |
python -m pip install \
--editable .ci-components/pg_configurator \
--editable .ci-components/pg_converter \
--editable .ci-components/pg_diag \
--editable .ci-components/pg_perf_bench \
--editable .ci-components/pg_stand \
--editable .ci-components/pg_workload \
--editable .ci-components/pg_maker \
--editable .ci-components/pg_logical_repl \
--editable '.[dev]'
- run: ruff check --exclude .ci-components .
- run: ruff format --check --exclude .ci-components .
- run: python -m pytest -q
- run: python -m pip check
distribution:
runs-on: ubuntu-24.04
needs: unit
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
- name: Check out pg_maker sources
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
with:
repository: O2eg/pg_maker
path: .ci-components/pg_maker
- name: Check out pg_logical_repl sources
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
with:
repository: O2eg/pg_logical_repl
path: .ci-components/pg_logical_repl
- name: Check out component sources
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
with:
repository: O2eg/pg_configurator
path: .ci-components/pg_configurator
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
with:
repository: O2eg/pg_converter
path: .ci-components/pg_converter
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
with:
repository: O2eg/pg_diag
path: .ci-components/pg_diag
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
with:
repository: O2eg/pg_perf_bench
path: .ci-components/pg_perf_bench
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
with:
repository: O2eg/pg_stand
path: .ci-components/pg_stand
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
with:
repository: O2eg/pg_workload
path: .ci-components/pg_workload
- 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/*
- run: python tests/check_distribution.py dist/*.whl dist/*.tar.gz
- name: Verify combined and standalone wheel installations
shell: bash
run: |
wheelhouse="${RUNNER_TEMP}/pg-play-wheelhouse"
verification="${GITHUB_WORKSPACE}/tests/check_installation.py"
python -m pip wheel --wheel-dir "$wheelhouse" ./.ci-components/* dist/*.whl
cd "${RUNNER_TEMP}"
python -m venv pg-play-wheel-smoke
pg-play-wheel-smoke/bin/python -m pip install --no-index --find-links "$wheelhouse" pg-play
pg-play-wheel-smoke/bin/python -m pip check
PATH="$PWD/pg-play-wheel-smoke/bin:$PATH" pg-play-wheel-smoke/bin/python "$verification"
for component in pg-configurator pg-converter pg-diag pg-logical-repl pg-maker pg-perf-bench pg-stand pg-workload; do
environment="${RUNNER_TEMP}/standalone-${component}"
python -m venv "$environment"
"$environment/bin/python" -m pip install --no-index --find-links "$wheelhouse" "$component"
"$environment/bin/python" -m pip check
"$environment/bin/python" "$verification" --standalone "$component"
done