Skip to content

Commit b60ab55

Browse files
add package version file validation in test workflow before package creation
1 parent 9028e88 commit b60ab55

File tree

3 files changed

+15
-11
lines changed

3 files changed

+15
-11
lines changed

.github/workflows/test.yml

+13-10
Original file line numberDiff line numberDiff line change
@@ -40,22 +40,14 @@ jobs:
4040
- name: Lint with yamllint
4141
run: |
4242
yamllint .
43-
- name: Install deploy dependencies
44-
run: |
45-
python -m pip install --upgrade pip
46-
if [ -f requirements-deploy.txt ]; then pip install -r requirements-deploy.txt; fi
47-
- name: Build package
43+
- name: Validate package version file
4844
run: |
4945
changelog2version \
5046
--changelog_file changelog.md \
5147
--version_file be_upy_blink/version.py \
5248
--version_file_type py \
49+
--validate \
5350
--debug
54-
python setup.py sdist
55-
rm dist/*.orig
56-
- name: Test built package
57-
run: |
58-
twine check dist/*
5951
- name: Validate mip package file
6052
run: |
6153
upy-package \
@@ -66,3 +58,14 @@ jobs:
6658
# use --ignore-version to skip version validation
6759
# use --ignore-deps to skip dependency validation
6860
# use --ignore-boot-main to skip boot.py and main.py files in URLs
61+
- name: Install deploy dependencies
62+
run: |
63+
python -m pip install --upgrade pip
64+
if [ -f requirements-deploy.txt ]; then pip install -r requirements-deploy.txt; fi
65+
- name: Build package
66+
run: |
67+
python setup.py sdist
68+
rm dist/*.orig
69+
- name: Test built package
70+
run: |
71+
twine check dist/*

changelog.md

+1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ r"^\#\# \[\d{1,}[.]\d{1,}[.]\d{1,}\] \- \d{4}\-\d{2}-\d{2}$"
2121
### Added
2222
- Precommit hooks for `package.json` and package version file validation, yaml style, flake8 and trailing whitespace checks
2323
- Contribution guideline
24+
- Package version file validation step in test workflow
2425

2526
### Fixed
2627
- Added missing empty line in several files

requirements-test.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ changelog2version>=0.10.0,<1
44
coverage>=6.4.2,<7
55
flake8>=5.0.0,<6
66
nose2>=0.12.0,<1
7-
setup2upypackage>=0.1.0,<1
7+
setup2upypackage>=0.4.0,<1
88
pre-commit>=3.3.3,<4
99
yamllint>=1.29,<2

0 commit comments

Comments
 (0)