Feat/check-v2 common packages under open cepk #17
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
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: 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 | |
# ---------------------- | |
# 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: Run test-pre-commit-hook.sh for find-replace-strings package | |
run: | | |
pip install pre-commit | |
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: | | |
pip install pre-commit | |
cd opencepk_lib_python_common/pypi_bumpversion_check_package/tests-pre-commit-hook | |
./test-pre-commit-hook.sh |