Skip to content

Commit 9c34113

Browse files
committed
Add build test
Signed-off-by: Liran Funaro <liran.funaro@gmail.com>
1 parent 07dd84e commit 9c34113

File tree

2 files changed

+13
-4
lines changed

2 files changed

+13
-4
lines changed

.github/workflows/test.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ jobs:
2222
pip install .[dev]
2323
- name: Lint
2424
run: make lint
25+
- name: Build distribution
26+
run: make dist
2527

2628
test:
2729
runs-on: ubuntu-latest

Makefile

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ TESTS_DIR = tests
77
SOURCE_DIR = $(TESTS_DIR)/source
88
BUILD_DIR = $(TESTS_DIR)/docs-build
99
EXPECTED_DIR = $(TESTS_DIR)/expected
10+
DIST_DIR ?= dist
1011

1112
.PHONY: help clean test test-diff diff meld release
1213

@@ -16,7 +17,7 @@ help:
1617

1718

1819
clean:
19-
rm -rf "$(BUILD_DIR)" "$(SOURCE_DIR)/library"
20+
rm -rf "$(BUILD_DIR)" "$(DIST_DIR)" "$(SOURCE_DIR)/library"
2021

2122

2223
# Catch-all target: route all unknown targets to Sphinx using the new "make mode" option.
@@ -67,7 +68,13 @@ lint:
6768
pylint sphinx_markdown_builder -v --disable C0116,C0115
6869

6970

70-
release:
71-
@rm -rf dist/*
72-
python3 -m build || exit
71+
.PHONY: dist
72+
dist:
73+
@mkdir -p "$(DIST_DIR)"
74+
@rm -rf "$(DIST_DIR)/*"
75+
python3 -m build
76+
77+
78+
.PHONY: release
79+
release: dist
7380
python3 -m twine upload --repository sphinx-markdown-builder dist/*

0 commit comments

Comments
 (0)