Files
oh-my-zsh/.github/workflows/main.yml
T
Robby RussellandClaude Fable 5.2 f766a44194 ci: lock and time-limit the alias collision job
The job arrived from master in #10859 after this branch was cut, so
it had no timeout and its setup-python version was missing from the
lockfile.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-28 14:03:15 -08:00

74 lines
2.2 KiB
YAML

name: CI
on:
pull_request:
types:
- opened
- synchronize
branches:
- master
push:
branches:
- master
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
permissions:
contents: read # to fetch code (actions/checkout)
jobs:
tests:
name: Run tests
runs-on: ubuntu-latest
timeout-minutes: 10
if: github.repository == 'ohmyzsh/ohmyzsh'
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@v2.23.0
with:
egress-policy: audit
- name: Set up git repository
uses: actions/checkout@v7.0.1
- name: Install zsh
run: sudo apt-get update; sudo apt-get install zsh
- name: Check syntax
run: |
for file in ./oh-my-zsh.sh \
./lib/*.zsh \
./plugins/*/*.plugin.zsh \
./plugins/*/_* \
./themes/*.zsh-theme; do
zsh -n "$file" || return 1
done
collisions:
name: Check alias collisions
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Set up git repository
uses: actions/checkout@v7.0.1
- name: Set up Python
uses: actions/setup-python@v7.0.0
with:
python-version: '3.14'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r .github/workflows/alias_collision/requirements.txt
- name: Run unit tests
run: |
cd .github/workflows/alias_collision/
python -m pytest
- name: Checkout target branch
uses: actions/checkout@v7.0.1
with:
path: ohmyzsh-target-branch
ref: master
- name: Check for alias collisions on target branch
run: python .github/workflows/alias_collision/check_alias_collision.py ohmyzsh-target-branch/plugins --known-collisions-output-path known_alias_collisions.json
- name: Compare known collisions to new collisions on source branch
run: python .github/workflows/alias_collision/check_alias_collision.py plugins --known-collisions known_alias_collisions.json