GHA-163 Add Lock Branch Action to manage branch protection settings #1
Workflow file for this run
This file contains hidden or 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: Test Lock Branch Action | |
| on: | |
| workflow_call: | |
| pull_request: | |
| paths: | |
| - 'lock-branch/**' | |
| - '.github/workflows/test-lock-branch.yml' | |
| push: | |
| branches: | |
| - branch-* | |
| paths: | |
| - 'lock-branch/**' | |
| - '.github/workflows/test-lock-branch.yml' | |
| workflow_dispatch: | |
| jobs: | |
| unit-tests: | |
| name: Run Unit Tests | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 | |
| with: | |
| python-version: '3.10' | |
| cache: 'pip' | |
| cache-dependency-path: lock-branch/requirements.txt | |
| - name: Install dependencies | |
| run: | | |
| cd lock-branch | |
| pip install -r requirements.txt | |
| pip install pytest pytest-cov | |
| - name: Run unit tests | |
| run: | | |
| cd lock-branch | |
| python -m pytest test_utils.py test_lock_branch.py test_notify_slack.py -v --cov=utils --cov=lock_branch --cov=notify_slack --cov-report=term-missing |