forked from cnighswonger/claude-code-cache-fix
-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (48 loc) · 1.85 KB
/
Copy pathtest-shim.yml
File metadata and controls
52 lines (48 loc) · 1.85 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
name: Test shim
# Tests for tools/gh-auth-status-shim/. Separate from the main Node proxy
# test workflow (.github/workflows/test.yml) — different language, different
# test framework, should not gate proxy PRs.
on:
push:
branches: [main]
paths:
- 'tools/gh-auth-status-shim/**'
- '.github/workflows/test-shim.yml'
pull_request:
branches: [main]
paths:
- 'tools/gh-auth-status-shim/**'
- '.github/workflows/test-shim.yml'
jobs:
test-linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install bats
run: sudo apt-get update && sudo apt-get install -y bats
- name: Install shellcheck
run: sudo apt-get install -y shellcheck
- name: shellcheck (default mode)
run: |
shellcheck \
tools/gh-auth-status-shim/gh-auth-status-shim.sh \
tools/gh-auth-status-shim/lib/classify-auth-status.sh \
tools/gh-auth-status-shim/install.sh \
tools/gh-auth-status-shim/uninstall.sh
- name: bats unit + integration + install tests
run: bats tools/gh-auth-status-shim/tests/
test-macos:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: Install bats
run: brew install bats-core
- name: Confirm /bin/bash is 3.2
run: |
/bin/bash --version
/bin/bash -c 'case "$BASH_VERSION" in 3.2*) echo "OK: bash 3.2 floor confirmed";; *) echo "FAIL: expected 3.2.x, got $BASH_VERSION" >&2; exit 1;; esac'
- name: bats under /bin/bash (3.2 floor verification)
# Force the bats suite to run under /bin/bash (3.2) explicitly.
# Without this, bats's `#!/usr/bin/env bash` shebang may resolve to
# Homebrew bash and the bash-3.2 floor claim becomes theater.
run: /bin/bash "$(which bats)" tools/gh-auth-status-shim/tests/