Skip to content

Commit 5292b79

Browse files
Add twine check in lint workflow (#307)
## 📝 Description `twine check` is necessary to ensure the package can be built and validated for publishing on PyPI. ## ✔️ How to Test `make lint` or see the GHA run result.
1 parent 5b4cb2c commit 5292b79

4 files changed

Lines changed: 13 additions & 11 deletions

File tree

.github/workflows/lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
python-version: '3.x'
1919

2020
- name: install dependencies
21-
run: pip3 install -r requirements-dev.txt -r requirements.txt
21+
run: make requirements
2222

2323
- name: run linter
2424
run: make lint

.github/workflows/main.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ jobs:
1616
matrix:
1717
python-version: ['3.7','3.8','3.9','3.10','3.11']
1818
steps:
19-
- uses: actions/checkout@v2
20-
- uses: actions/setup-python@v2
19+
- uses: actions/checkout@v3
20+
- uses: actions/setup-python@v4
2121
with:
2222
python-version: ${{ matrix.python-version }}
2323
- name: Run tests

Makefile

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,35 +27,36 @@ build: clean
2727
release: build
2828
twine upload dist/*
2929

30-
30+
@PHONEY: install
3131
install: clean
3232
python3 -m pip install .
3333

34-
34+
@PHONEY: requirements
3535
requirements:
3636
pip install -r requirements.txt -r requirements-dev.txt
3737

38-
38+
@PHONEY: black
3939
black:
4040
black linode_api4 test
4141

42-
42+
@PHONEY: isort
4343
isort:
4444
isort linode_api4 test
4545

46-
46+
@PHONEY: autoflake
4747
autoflake:
4848
autoflake linode_api4 test
4949

50-
50+
@PHONEY: format
5151
format: black isort autoflake
5252

53-
54-
lint:
53+
@PHONEY: lint
54+
lint: build
5555
isort --check-only linode_api4 test
5656
autoflake --check linode_api4 test
5757
black --check --verbose linode_api4 test
5858
pylint linode_api4
59+
twine check dist/*
5960

6061
@PHONEY: testint
6162
testint:

requirements-dev.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,4 @@ sphinxcontrib-fulltoc>=1.2.0
1010
pytest>=7.3.1
1111
httpretty>=1.1.4
1212
build>=0.10.0
13+
twine>=4.0.2

0 commit comments

Comments
 (0)