also looking at this
chore(deps): update all non-major dependencies
#418
11 files
+442
-40
| @@ -21,7 +21,7 @@ jobs: | ||
| 21 | 21 | - uses: actions/checkout@v4 |
| 22 | 22 | |
| 23 | 23 | - name: Install Bun |
| 24 | uses: oven-sh/setup-bun@v2 | |
| 24 | uses: oven-sh/setup-bun@v2.1.2 | |
| 25 | 25 | |
| 26 | 26 | - name: Use cached node_modules |
| 27 | 27 | uses: actions/cache@v4 |
| @@ -44,7 +44,7 @@ jobs: | ||
| 44 | 44 | - uses: actions/checkout@v4 |
| 45 | 45 | |
| 46 | 46 | - name: Install Bun |
| 47 | uses: oven-sh/setup-bun@v2 | |
| 47 | uses: oven-sh/setup-bun@v2.1.2 | |
| 48 | 48 | |
| 49 | 49 | - name: Use cached node_modules |
| 50 | 50 | uses: actions/cache@v4 |
| @@ -67,7 +67,7 @@ jobs: | ||
| 67 | 67 | - uses: actions/checkout@v4 |
| 68 | 68 | |
| 69 | 69 | - name: Install Bun |
| 70 | uses: oven-sh/setup-bun@v2 | |
| 70 | uses: oven-sh/setup-bun@v2.1.2 | |
| 71 | 71 | |
| 72 | 72 | - name: Use cached node_modules |
| 73 | 73 | uses: actions/cache@v4 |
| @@ -81,7 +81,22 @@ jobs: | ||
| 81 | 81 | run: bun install |
| 82 | 82 | |
| 83 | 83 | - name: Unit Test |
| 84 | run: bun test | |
| 84 | run: bun test --coverage 2>&1 | tee coverage-output.txt | |
| 85 | ||
| 86 | - name: Check Coverage Threshold | |
| 87 | run: | | |
| 88 | if grep -q "All files" coverage-output.txt; then | |
| 89 | LINE_COV=$(grep "All files" coverage-output.txt | awk '{print $4}' | tr -d '%') | |
| 90 | echo "Line coverage: ${LINE_COV}%" | |
| 91 | THRESHOLD=50 | |
| 92 | if [ "$(echo "${LINE_COV} < ${THRESHOLD}" | bc -l)" -eq 1 ]; then | |
| 93 | echo "::error::Line coverage ${LINE_COV}% is below threshold ${THRESHOLD}%" | |
| 94 | exit 1 | |
| 95 | fi | |
| 96 | echo "Coverage ${LINE_COV}% meets threshold ${THRESHOLD}%" | |
| 97 | else | |
| 98 | echo "Coverage report not found — skipping threshold check" | |
| 99 | fi | |
| 85 | 100 | |
| 86 | 101 | publish-commit: |
| 87 | 102 | runs-on: ubuntu-latest |
| @@ -90,7 +105,7 @@ jobs: | ||
| 90 | 105 | - uses: actions/checkout@v4 |
| 91 | 106 | |
| 92 | 107 | - name: Install Bun |
| 93 | uses: oven-sh/setup-bun@v2 | |
| 108 | uses: oven-sh/setup-bun@v2.1.2 | |
| 94 | 109 | |
| 95 | 110 | - name: Use cached node_modules |
| 96 | 111 | uses: actions/cache@v4 |