-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (35 loc) · 1.04 KB
/
Copy pathci.yml
File metadata and controls
43 lines (35 loc) · 1.04 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
name: CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run ShellCheck
uses: ludeeus/action-shellcheck@master
with:
scandir: './bin'
- name: Run tests
run: ./run-tests.sh
- name: Verify installer
run: |
# Mocking the installation directory to avoid permission issues in CI
export INSTALL_DIR="$HOME/.local/bin"
mkdir -p "$INSTALL_DIR"
export PATH="$INSTALL_DIR:$PATH"
# Test the installer script
bash ./install.sh
# Verify the binary was installed and is executable
if [[ ! -x "$INSTALL_DIR/bigquery-schema-select" ]]; then
echo "Installer failed to place executable at $INSTALL_DIR/bigquery-schema-select"
ls -R "$HOME/.local"
exit 1
fi
# Verify it runs using the PATH
hash -r
which bigquery-schema-select
bigquery-schema-select --help