Skip to content

Commit 50dbbc2

Browse files
ci(github): add integration test
1 parent 6cde96f commit 50dbbc2

File tree

2 files changed

+32
-2
lines changed

2 files changed

+32
-2
lines changed

.github/mergify.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ pull_request_rules:
22
- name: automatic merge for Dependabot pull requests
33
conditions:
44
- author=dependabot[bot]
5+
- check-success=build
56
- check-success=commitlint
67
- check-success=lint
7-
- check-success=test
88
- 'title~=^build\(deps-dev\): bump '
99
actions:
1010
merge:

.github/workflows/test.yml

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ permissions:
55
contents: read
66

77
jobs:
8-
test:
8+
unit:
99
runs-on: ubuntu-latest
1010
steps:
1111
- name: Checkout repository
@@ -30,3 +30,33 @@ jobs:
3030
uses: codecov/codecov-action@v5
3131
with:
3232
token: ${{ secrets.CODECOV_TOKEN }}
33+
34+
integration:
35+
runs-on: ubuntu-latest
36+
steps:
37+
- name: Checkout repository
38+
uses: actions/checkout@v4
39+
40+
- name: Use Python
41+
uses: actions/setup-python@v5
42+
with:
43+
cache: pip
44+
python-version: 3
45+
46+
- name: Install package
47+
run: pipx install .
48+
49+
- name: Check version
50+
run: |
51+
set -e
52+
version=$(python -c 'import python_cli_template; print(python_cli_template.__version__)')
53+
[[ $(python -m python_cli_template --version) == $version ]]
54+
[[ $(python -m python_cli_template -v) == $version ]]
55+
[[ $(python_cli_template --version) == $version ]]
56+
[[ $(python_cli_template -v) == $version ]]
57+
58+
- name: Get help
59+
run: python_cli_template --help
60+
61+
- name: Execute CLI
62+
run: python_cli_template --name test

0 commit comments

Comments
 (0)