Skip to content
Open
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/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
name: Unit tests
strategy:
matrix:
node-version: [18, 20, 22]
node-version: [22, 24, 26]
os: [ubuntu-latest, macos-latest, windows-latest]
fail-fast: false

Expand Down
4 changes: 2 additions & 2 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module.exports = {
...require('gts/.prettierrc.json')
}
...require('gts/.prettierrc.json'),
};
32 changes: 30 additions & 2 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,21 @@ function lint() {

## deps - updates project dependencies to latest
function deps() {
version=${1:-22}

# Use NVM
if [[ ! -d "$NVM_DIR" ]] ; then
echo "Please activate nvm"
exit 1
fi

# Use the minimum node version to run the updates.
source "$NVM_DIR/nvm.sh"
nvm use $version

npm update --save
# When we run this on a cloudtop, the urls in package-lock.json are replaced
# with an internal server. We need to manually update package-lock.json
# When we run this on a cloudtop, the urls in package-lock.json are replaced
# with an internal server. We need to manually update package-lock.json
# to set them back to https://registry.npmjs.org/
if [[ "$OSTYPE" == "darwin"* ]]; then
sed -i '' "s|https://us-npm.pkg.dev/artifact-foundry-prod/ah-3p-staging-npm/|https://registry.npmjs.org/|g" package-lock.json
Expand All @@ -79,6 +91,22 @@ function deps() {
fi
}

## test_node_versions deps uses nvm to run the test against all
function test_deps() {
source "$HOME/.nvm/nvm.sh"

for v in 22 24 26 ; do
echo
echo "*"
echo "* Running tests with node v$v"
echo "*"
nvm use $v
rm -rf "$SCRIPT_DIR/node_modules"
npm ci
npm run test
done
}

# write_e2e_env - Loads secrets from the gcloud project and writes
# them to target/e2e.env to run e2e tests.
function write_e2e_env(){
Expand Down
Loading
Loading