|
7 | 7 | - main |
8 | 8 |
|
9 | 9 | jobs: |
10 | | - bash3: |
11 | | - name: "Bash 3.0 Compatibility Tests" |
| 10 | + bash3-setup: |
| 11 | + name: "Setup - Install Bash 3.0" |
12 | 12 | runs-on: ubuntu-latest |
13 | | - timeout-minutes: 15 |
| 13 | + timeout-minutes: 10 |
14 | 14 | steps: |
15 | 15 | - name: Checkout |
16 | 16 | uses: actions/checkout@v4 |
17 | 17 | with: |
18 | 18 | fetch-depth: 1 |
19 | 19 |
|
| 20 | + - name: Cache Bash 3.0 Binary |
| 21 | + uses: actions/cache@v4 |
| 22 | + id: cache-bash3 |
| 23 | + with: |
| 24 | + path: /opt/bash-3.0 |
| 25 | + key: bash-3.0.22-${{ runner.os }} |
| 26 | + |
20 | 27 | - name: Install Bash 3.0 |
| 28 | + if: steps.cache-bash3.outputs.cache-hit != 'true' |
21 | 29 | run: | |
22 | 30 | # Update package lists |
23 | 31 | sudo apt-get update |
@@ -46,17 +54,50 @@ jobs: |
46 | 54 | # Verify installation |
47 | 55 | /usr/local/bin/bash3 --version |
48 | 56 |
|
49 | | - - name: Run Tests with Bash 3.0 |
| 57 | + bash3-tests: |
| 58 | + name: "Bash 3.0 Tests - ${{ matrix.test_mode }}" |
| 59 | + runs-on: ubuntu-latest |
| 60 | + timeout-minutes: 15 |
| 61 | + needs: bash3-setup |
| 62 | + strategy: |
| 63 | + matrix: |
| 64 | + test_mode: |
| 65 | + - standard |
| 66 | + - simple |
| 67 | + - parallel |
| 68 | + fail-fast: false |
| 69 | + steps: |
| 70 | + - name: Checkout |
| 71 | + uses: actions/checkout@v4 |
| 72 | + with: |
| 73 | + fetch-depth: 1 |
| 74 | + |
| 75 | + - name: Restore Bash 3.0 from Cache |
| 76 | + uses: actions/cache@v4 |
| 77 | + with: |
| 78 | + path: /opt/bash-3.0 |
| 79 | + key: bash-3.0.22-${{ runner.os }} |
| 80 | + |
| 81 | + - name: Create Bash 3.0 Symlink |
| 82 | + run: sudo ln -sf /opt/bash-3.0/bin/bash /usr/local/bin/bash3 |
| 83 | + |
| 84 | + - name: Run Tests - Standard Mode |
| 85 | + if: matrix.test_mode == 'standard' |
50 | 86 | run: | |
51 | | - # Use bash 3.0 explicitly |
52 | 87 | /usr/local/bin/bash3 ./bashunit tests/unit/ -q |
53 | 88 | env: |
54 | 89 | BASH: /usr/local/bin/bash3 |
55 | 90 |
|
56 | | - - name: Run tests with different output modes (Bash 3.0) |
| 91 | + - name: Run Tests - Simple Output Mode |
| 92 | + if: matrix.test_mode == 'simple' |
57 | 93 | run: | |
58 | | - # Test with simple output |
59 | 94 | /usr/local/bin/bash3 ./bashunit --simple tests/unit/ -q |
| 95 | + env: |
| 96 | + BASH: /usr/local/bin/bash3 |
60 | 97 |
|
61 | | - # Test with parallel execution |
| 98 | + - name: Run Tests - Parallel Mode |
| 99 | + if: matrix.test_mode == 'parallel' |
| 100 | + run: | |
62 | 101 | /usr/local/bin/bash3 ./bashunit --parallel tests/unit/ -q |
| 102 | + env: |
| 103 | + BASH: /usr/local/bin/bash3 |
0 commit comments