Parent directory

main.yml

1147 bytes
 1name: CI
 2on:
 3  pull_request:
 4    types:
 5      - opened
 6      - synchronize
 7    branches:
 8      - master
 9  push:
10    branches:
11      - master
12
13concurrency:
14  group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
15  cancel-in-progress: true
16
17permissions:
18  contents: read # to fetch code (actions/checkout)
19
20jobs:
21  tests:
22    name: Run tests
23    runs-on: ubuntu-latest
24    if: github.repository == 'ohmyzsh/ohmyzsh'
25    steps:
26      - name: Harden the runner (Audit all outbound calls)
27        uses: step-security/harden-runner@b09bb98e06d4d774595224525879c09bc6e98c40 # v2.20.1
28        with:
29          egress-policy: audit
30
31      - name: Set up git repository
32        uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
33      - name: Install zsh
34        run: sudo apt-get update; sudo apt-get install zsh
35      - name: Check syntax
36        run: |
37          for file in ./oh-my-zsh.sh \
38                      ./lib/*.zsh \
39                      ./plugins/*/*.plugin.zsh \
40                      ./plugins/*/_* \
41                      ./themes/*.zsh-theme; do
42            zsh -n "$file" || return 1
43          done