JIRA transitions #200
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: Check Pull Request | |
| on: [pull_request] | |
| jobs: | |
| actionlint: | |
| name: Lint GitHub Actions workflows | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Download actionlint | |
| id: get_actionlint | |
| run: bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash) | |
| shell: bash | |
| - name: Add problem matcher | |
| run: | | |
| echo "::add-matcher::.github/actionlint-matcher.json" | |
| - name: Check workflow files | |
| run: ${{ steps.get_actionlint.outputs.executable }} -color | |
| shell: bash | |
| tests: | |
| name: Test Actions | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Install Bats | |
| id: install_bats | |
| uses: bats-core/[email protected] | |
| - name: Run tests | |
| shell: bash | |
| env: | |
| BATS_LIB_PATH: ${{ steps.install_bats.outputs.lib-path }} | |
| TERM: xterm | |
| run: | | |
| # Find and run all .bats test files | |
| BATS_FILES=$(find .github/actions -name "*.bats" -type f | sort) | |
| if [ -z "$BATS_FILES" ]; then | |
| echo "No .bats test files found" | |
| exit 0 | |
| fi | |
| echo "Found the following test files:" | |
| echo "$BATS_FILES" | |
| echo "" | |
| FAILED=0 | |
| for bats_file in $BATS_FILES; do | |
| echo "Running tests in $bats_file..." | |
| if ! bats "$bats_file"; then | |
| echo "❌ Tests failed in $bats_file" | |
| FAILED=1 | |
| else | |
| echo "✅ Tests passed in $bats_file" | |
| fi | |
| echo "" | |
| done | |
| if [ $FAILED -eq 1 ]; then | |
| echo "Some tests failed" | |
| exit 1 | |
| fi | |
| echo "All tests passed!" |