main.yml 902 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. name: CI
  2. on:
  3. pull_request:
  4. types:
  5. - opened
  6. - synchronize
  7. branches:
  8. - master
  9. push:
  10. branches:
  11. - master
  12. concurrency:
  13. group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
  14. cancel-in-progress: true
  15. permissions:
  16. contents: read # to fetch code (actions/checkout)
  17. jobs:
  18. tests:
  19. name: Run tests
  20. runs-on: ubuntu-latest
  21. if: github.repository == 'ohmyzsh/ohmyzsh'
  22. steps:
  23. - name: Set up git repository
  24. uses: actions/checkout@v4
  25. - name: Install zsh
  26. run: sudo apt-get update; sudo apt-get install zsh
  27. - name: Check syntax
  28. run: |
  29. for file in ./oh-my-zsh.sh \
  30. ./lib/*.zsh \
  31. ./plugins/*/*.plugin.zsh \
  32. ./plugins/*/_* \
  33. ./themes/*.zsh-theme; do
  34. zsh -n "$file" || return 1
  35. done