Skip to content

Commit 36ea767

Browse files
committed
feat(ci): add pull request action and pytest.ini
1 parent f95e339 commit 36ea767

File tree

4 files changed

+36
-0
lines changed

4 files changed

+36
-0
lines changed

.github/workflows/ci.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,23 @@ jobs:
3535
pip install codespell==2.2
3636
git grep --cached -l '' | grep -v -e 'History\.md' -e 'AUTHORS' -e 'man/.*\.1' -e 'man/.*\.html' | xargs codespell --ignore-words=.github/.ignore_words
3737
38+
test:
39+
runs-on: ubuntu-latest
40+
41+
steps:
42+
- uses: actions/checkout@v3
43+
- name: Set up Python 3.10
44+
uses: actions/setup-python@v4
45+
with:
46+
python-version: '3.10'
47+
- name: Install dependencies
48+
run: |
49+
python -m pip install --upgrade pip
50+
pip install pytest==7.4.0
51+
pip install GitPython==3.1.36
52+
- name: Unit test
53+
run: make test
54+
3855
build:
3956
strategy:
4057
fail-fast: false

.pytest.ini

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[pytest]
2+
minversion = 7.4
3+
addopts = -ra -q
4+
testpaths = tests

Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,4 +138,7 @@ docclean:
138138
rm -f man/*.1
139139
rm -f man/*.html
140140

141+
test:
142+
pytest
143+
141144
.PHONY: default docs clean docclean check install uninstall

Readme.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,18 @@ Go to the [Commands](Commands.md) page for basic usage and examples.
1818

1919
__GIT utilities__ -- repo summary, repl, changelog population, author commit percentages and more
2020

21+
## Test
22+
23+
Nowaday the continues integrations test is coming and you can access it via the `make test` easily.
24+
25+
The CI depends on
26+
27+
* `python==3.10`
28+
* `pytest==7.4.0`
29+
* `GitPython==3.1.36`
30+
31+
So the version or higher is recommended.
32+
2133
## Contributing
2234

2335
Interested in contributing? Awesome!

0 commit comments

Comments
 (0)