Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/commitlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
sudo apt install -y sudo
sudo apt install -y git curl

- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: 20
- name: node setup
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
# cache: "npm" # needs lockfile if enabled
Expand Down
4 changes: 3 additions & 1 deletion test/sync-agents.bats
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

# Resolve the script under test relative to this test file
SCRIPT="$(cd "$(dirname "$BATS_TEST_FILENAME")/../src/sh" && pwd)/sync-agents.sh"
# Read version from package.json so the test stays in sync after bumps
PACKAGE_VERSION="$(sed -n 's/.*"version": *"\([^"]*\)".*/\1/p' "$(cd "$(dirname "$BATS_TEST_FILENAME")/.." && pwd)/package.json" | head -1)"

setup() {
# Create a temporary directory for each test
Expand Down Expand Up @@ -41,7 +43,7 @@ teardown() {
@test "--version shows version from package.json" {
run bash "$SCRIPT" --version
[ "$status" -eq 0 ]
[[ "$output" == *"sync-agents v0.1.0"* ]]
[[ "$output" == *"sync-agents v${PACKAGE_VERSION}"* ]]
}

# --------------------------------------------------------------------------
Expand Down
Loading