feat(ci): cancel old CI jobs on PR updates #138
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: Merge-paths test | |
on: | |
push: | |
branches: | |
- main | |
- main-v[0-9].** | |
tags: | |
- v[0-9].** | |
paths: | |
- '.github/workflows/merge_paths_ci.yml' | |
- 'scripts/merge_branches.json' | |
- 'scripts/merge_paths.json' | |
- 'scripts/merge_paths_test.py' | |
- 'scripts/merge_status.py' | |
pull_request: | |
types: | |
- opened | |
- reopened | |
- synchronize | |
- auto_merge_enabled | |
- edited | |
paths: | |
- '.github/workflows/merge_paths_ci.yml' | |
- 'scripts/merge_branches.json' | |
- 'scripts/merge_paths.json' | |
- 'scripts/merge_paths_test.py' | |
- 'scripts/merge_status.py' | |
# On PR events, cancel existing CI runs on this same PR for this workflow. | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: ${{ github.event.name == 'pull_request' }} | |
jobs: | |
merge-paths-test: | |
runs-on: starkware-ubuntu-latest-small | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.9' | |
- run: | | |
python -m pip install --upgrade pip | |
pip install pytest | |
- run: pytest scripts/merge_paths_test.py |