CI/CD Pipeline #11
Workflow file for this run
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: CI/CD Pipeline | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| jobs: | |
| lint-and-test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout Repository | |
| uses: actions/checkout@v3 | |
| - name: Install ShellCheck | |
| run: sudo apt-get install -y shellcheck | |
| - name: Lint Shell Scripts | |
| run: | | |
| echo "🔍 Linting all scripts in the 'scripts/' directory..." | |
| shellcheck scripts/*.sh || echo "⚠️ Linting issues found." | |
| - name: Test Shell Scripts | |
| run: | | |
| echo "🚀 Testing all scripts in the 'scripts/' directory..." | |
| for script in scripts/*.sh; do | |
| chmod +x "$script" | |
| echo "Testing $script..." | |
| "$script" --dry-run || echo "⚠️ Script $script failed during execution." | |
| done |