Issues 7 | create scripts for javascript #8
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Git Hooks Tests | |
| on: | |
| pull_request: | |
| push: | |
| branches: [ main ] | |
| jobs: | |
| shellcheck: | |
| name: ShellCheck Lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Run ShellCheck | |
| run: | | |
| find . -name "*.sh" -not -path "./vendor/*" -exec shellcheck {} + | |
| php-tests: | |
| name: PHP Tests | |
| runs-on: ubuntu-latest | |
| needs: shellcheck | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: '8.2' | |
| tools: composer | |
| - name: Install dependencies | |
| run: | | |
| composer init -n | |
| composer require --dev phpstan/phpstan | |
| - name: Prepare test environment | |
| run: | | |
| chmod +x php/*.sh | |
| chmod +x php/laravel/*.sh 2>/dev/null || true | |
| chmod +x tests/lib/*.bash | |
| find tests/php -name "*.sh" -exec chmod +x {} + | |
| - name: Run PHP tests | |
| run: ./tests/php/phpstan/run.sh | |
| python-tests: | |
| name: Python Tests | |
| runs-on: ubuntu-latest | |
| needs: shellcheck | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Prepare test environment | |
| run: | | |
| chmod +x python/*.sh | |
| chmod +x tests/lib/*.bash | |
| find tests/python -name "*.sh" -exec chmod +x {} + | |
| - name: Run Python tests | |
| run: | | |
| for suite in tests/python/*/run.sh; do "$suite"; done | |
| javascript-tests: | |
| name: JavaScript Tests | |
| runs-on: ubuntu-latest | |
| needs: shellcheck | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Prepare test environment | |
| run: | | |
| chmod +x javascript/*.sh | |
| chmod +x tests/lib/*.bash | |
| find tests/javascript -name "*.sh" -exec chmod +x {} + | |
| - name: Run JavaScript tests | |
| run: | | |
| for suite in tests/javascript/*/run.sh; do "$suite"; done |