Skip to content

Commit 7cc1262

Browse files
author
Jacob Truman
committed
XENG-8957 Create version file for build steps
1 parent b961fc8 commit 7cc1262

File tree

4 files changed

+17
-3
lines changed

4 files changed

+17
-3
lines changed

.github/workflows/build.yaml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,9 @@ jobs:
5959
# Fetch all history instead of the latest commit
6060
fetch-depth: 0
6161
- name: Get and set version in env
62-
run: echo "CURRENT_VERSION=$( python setup.py --version )" >> $GITHUB_ENV
62+
run: |
63+
python scripts/write-version.py
64+
echo "CURRENT_VERSION=$( python -c 'from buildrunner.version import __version__; print(__version__)' )" >> $GITHUB_ENV
6365
- name: Print current version
6466
run: echo CURRENT_VERSION ${{ env.CURRENT_VERSION }}
6567
- name: Tag commit
@@ -80,6 +82,8 @@ jobs:
8082
- name: Remove version file
8183
# This is just in case something else created it, destroy it to get a fresh version
8284
run: rm -f buildrunner/version.py
85+
- name: Write version file
86+
run: python scripts/write-version.py
8387
- name: Install wheel
8488
run: pip install wheel build
8589
- name: Build
@@ -103,7 +107,9 @@ jobs:
103107
# Fetch all history instead of the latest commit
104108
fetch-depth: 0
105109
- name: Get and set version in env
106-
run: echo "CURRENT_VERSION=$( python setup.py --version )" >> $GITHUB_ENV
110+
run: |
111+
python scripts/write-version.py
112+
echo "CURRENT_VERSION=$( python -c 'from buildrunner.version import __version__; print(__version__)' )" >> $GITHUB_ENV
107113
- name: Print current version
108114
run: echo CURRENT_VERSION ${{ env.CURRENT_VERSION }}
109115
- name: Docker Tags

pyproject.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,6 @@ buildrunner-cleanup = "buildrunner.cli:clean_cache"
3333

3434
[tool.setuptools.packages.find]
3535
exclude = ["*.tests", "*.tests.*", "tests.*", "tests"]
36+
37+
[tool.pytest.ini_options]
38+
retries = 2

test_requirements.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
pytest>=7.2.1
22
pytest-randomly>=3.5.0
3+
pytest-retry>=1.7.0
34
pytest-cov>=2.10.1
45
pytest-xdist>=2.4.0
56
graphlib-backport>=1.0.3

test_requirements.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@
22
# This file is autogenerated by pip-compile with Python 3.11
33
# by the following command:
44
#
5-
# pip-compile test_requirements.in
5+
# pip-compile --output-file=test_requirements.txt test_requirements.in
66
#
7+
78
attrs==23.1.0
89
# via
910
# cattrs
@@ -51,13 +52,16 @@ pytest==7.3.1
5152
# pytest-cov
5253
# pytest-randomly
5354
# pytest-rerunfailures
55+
# pytest-retry
5456
# pytest-xdist
5557
pytest-cov==4.1.0
5658
# via -r test_requirements.in
5759
pytest-randomly==3.12.0
5860
# via -r test_requirements.in
5961
pytest-rerunfailures==14.0
6062
# via -r test_requirements.in
63+
pytest-retry==1.7.0
64+
# via -r test_requirements.in
6165
pytest-xdist==3.3.1
6266
# via -r test_requirements.in
6367
pyyaml==6.0.1

0 commit comments

Comments
 (0)