-
Notifications
You must be signed in to change notification settings - Fork 11
52 lines (43 loc) · 1.43 KB
/
Copy pathci.yml
File metadata and controls
52 lines (43 loc) · 1.43 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: Package CI
on:
pull_request:
permissions:
contents: read
concurrency:
group: package-ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
package:
runs-on: ubuntu-22.04
timeout-minutes: 10
steps:
- name: Check out the repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
- name: Set up Node.js
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7
with:
node-version: "24"
- name: Install dependencies
run: npm ci
- name: Validate, build, typecheck, and test
run: npm run check
- name: Lint the package
run: npx --yes publint@0.3.24
- name: Pack and smoke-test the executable
shell: bash
run: |
package_root=$(mktemp -d)
install_root=$(mktemp -d)
npm pack --pack-destination "$package_root"
package_files=("$package_root"/*.tgz)
test -f "${package_files[0]}"
test "${#package_files[@]}" -eq 1
npm install --global --prefix "$install_root" "${package_files[0]}"
# npm global bins are prefix/bin on Unix and prefix/ itself on Windows.
bin_dir="$install_root/bin"
if [ ! -e "$bin_dir/gbot" ]; then
bin_dir="$install_root"
fi
"$bin_dir/gbot" --help
"$bin_dir/grok-bot" --help
"$bin_dir/gbot-install" --help