main.yml 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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: ${{ matrix.os }}
  21. if: github.repository == 'ohmyzsh/ohmyzsh'
  22. strategy:
  23. matrix:
  24. os: [ubuntu-latest, macos-latest]
  25. steps:
  26. - name: Set up git repository
  27. uses: actions/checkout@v3
  28. - name: Install zsh
  29. if: runner.os == 'Linux'
  30. run: sudo apt-get update; sudo apt-get install zsh
  31. - name: Test installer
  32. run: sh ./tools/install.sh
  33. - name: Check syntax
  34. run: |
  35. for file in ./oh-my-zsh.sh \
  36. ./lib/*.zsh \
  37. ./plugins/*/*.plugin.zsh \
  38. ./plugins/*/_* \
  39. ./themes/*.zsh-theme; do
  40. zsh -n "$file" || return 1
  41. done