main.yml 894 B

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