-
Notifications
You must be signed in to change notification settings - Fork 0
93 lines (78 loc) · 2.38 KB
/
tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
---
name: tests
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
# ----------------------
# JOB 1: Run unit tests
# ----------------------
tests-unit:
name: tests-unit
runs-on: ubuntu-latest
permissions:
id-token: write
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v5.1.0
with:
python-version: 3.11
- name: Run tests
run: python3 -m unittest opencepk_lib_python_common.find_and_replace_strings_package.tests.test_main
# ----------------------
# JOB 2: Run python package end to end test
# ----------------------
test-package-e2e:
name: test-package-e2e
runs-on: ubuntu-latest
permissions:
id-token: write
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v5.1.0
with:
python-version: 3.11
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install toml requests
- name: Run test-package-e2e.sh for find-replace-strings package
run: |
cd opencepk_lib_python_common/find_and_replace_strings_package/tests-package-e2e
./test-package-e2e.sh
- name: Run test-package-e2e.sh for check version package
run: |
cd opencepk_lib_python_common/pypi_bumpversion_check_package/tests-package-e2e
./test-package-e2e.sh
# ----------------------
# JOB 3: Run pre-commit hook test
# ----------------------
test-pre-commit-hook:
name: test-pre-commit-hook
runs-on: ubuntu-latest
permissions:
id-token: write
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v5.1.0
with:
python-version: 3.11
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pre-commit
- name: Run test-pre-commit-hook.sh for find-replace-strings package
run: |
cd opencepk_lib_python_common/find_and_replace_strings_package/tests-pre-commit-hook
./test-pre-commit-hook.sh
- name: Run test-pre-commit-hook.sh for check version package
run: |
cd opencepk_lib_python_common/pypi_bumpversion_check_package/tests-pre-commit-hook
./test-pre-commit-hook.sh