Repository navigation
96 lines (82 loc) · 2.79 KB
/
Copy pathci.yml
File metadata and controls
96 lines (82 loc) · 2.79 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
name: CI
on:
push:
branches: [main]
paths:
- 'plugins/**'
- 'plugin-tests/**'
- '.mcp-sdk.lock'
- '.shellcheckrc'
- '.gitignore'
- '.github/workflows/ci.yml'
- '.github/scripts/**'
- 'package.json'
- 'package-lock.json'
- 'tsconfig.json'
- 'eslint.config.mjs'
- '.github/workflows/npm-publish.yml'
pull_request:
paths:
- 'plugins/**'
- 'plugin-tests/**'
- '.mcp-sdk.lock'
- '.shellcheckrc'
- '.gitignore'
- '.github/workflows/ci.yml'
- '.github/scripts/**'
- 'package.json'
- 'package-lock.json'
- 'tsconfig.json'
- 'eslint.config.mjs'
- '.github/workflows/npm-publish.yml'
jobs:
bash:
name: Bash Tests & Lint
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Setup Node.js
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: 24
- name: Install npm dependencies
run: npm ci
- name: Type-check
run: npx tsc --noEmit -p .
- name: Lint
run: npx eslint . --max-warnings 0
- name: Node unit tests
run: node --test 'plugin-tests/github-mcp/pi/*.test.ts'
- name: Install jq
run: sudo apt-get update && sudo apt-get install -y jq
- name: Install ShellCheck
run: |
SHELLCHECK_VERSION="v0.11.0"
ARCH=$(uname -m) # x86_64 or aarch64 on GitHub runners
wget -q "https://github.com/koalaman/shellcheck/releases/download/${SHELLCHECK_VERSION}/shellcheck-${SHELLCHECK_VERSION}.linux.${ARCH}.tar.xz"
tar -xJf "shellcheck-${SHELLCHECK_VERSION}.linux.${ARCH}.tar.xz"
sudo mv "shellcheck-${SHELLCHECK_VERSION}/shellcheck" /usr/local/bin/
shellcheck --version
- name: ShellCheck
run: |
find plugins plugin-tests .github/scripts -type f \
\( -name '*.sh' -o -name '*.bats' -o -name '*.bash' \) \
-exec shellcheck --shell=bash --format=gcc {} +
- name: Vendored SDK matches the pinned release
run: .github/scripts/vendor-mcp-sdk.sh --check
- name: Setup BATS
uses: bats-core/bats-action@77d6fb60505b4d0d1d73e48bd035b55074bbfb43 # 4.0.0
with:
bats-version: 1.14.0
support-install: true
assert-install: true
assert-version: 2.2.4
detik-install: false
file-install: false
support-path: ${{ github.workspace }}/.bats/bats-support
assert-path: ${{ github.workspace }}/.bats/bats-assert
- name: BATS
run: |
echo "Running BATS tests with timing..."
bats --timing -r plugin-tests/