main.yml 1007 B

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