Skip to content

Commit 85c0a87

Browse files
author
Jason Peterson
committed
Merge branch 'main' into sdk-update-20240129-114135
# Conflicts: # .travis.yml # package.json
2 parents 04e6515 + 8edfac2 commit 85c0a87

File tree

8 files changed

+61
-14
lines changed

8 files changed

+61
-14
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ typings/
4949

5050
# Optional npm cache directory
5151
.npm
52+
.npmrc
5253

5354
# Optional eslint cache
5455
.eslintcache

.husky/commit-msg

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
npx --no-install commitlint --edit $1

.husky/pre-commit

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
npm test

.husky/pre-push

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
npm run build && npx jest test/

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@ jobs:
1818
- npm run build
1919
- npm run test-unit-travis || travis_terminate 1
2020
- npm run lint
21-
- npm run check-packages
21+
- npm run check-packages

README.md

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
<!--
2-
[![Build Status](https://travis-ci.com/IBM/code-engine-node-sdk.svg?token=eW5FVD71iyte6tTby8gr&branch=master)](https://travis.ibm.com/IBM/code-engine-node-sdk)
1+
[![Build Status](https://travis-ci.com/IBM/code-engine-node-sdk.svg?branch=main)](https://travis-ci.com/IBM/code-engine-node-sdk)
32
[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)
4-
[![npm-version](https://img.shields.io/npm/v/IBM/code-engine-node-sdk.svg)](https://www.npmjs.com/package/code-engine-sdk)
5-
[![codecov](https://codecov.io/gh/IBM/code-engine-node-sdk/branch/master/graph/badge.svg)](https://codecov.io/gh/IBM/code-engine-node-sdk)
3+
[![codecov](https://codecov.io/gh/IBM/code-engine-node-sdk/branch/main/graph/badge.svg)](https://codecov.io/gh/IBM/code-engine-node-sdk)
4+
5+
<!--[![npm-version](https://img.shields.io/npm/v/IBM/ibm-code-engine-node-sdk.svg)](https://www.npmjs.com/package/ibm-code-engine-sdk)
6+
67
-->
78
# NodeJS SDK for IBM Cloud Code Engine
89
Node.js client library to interact with the [Code Engine API](https://cloud.ibm.com/apidocs/codeengine).
@@ -21,15 +22,17 @@ Node.js client library to interact with the [Code Engine API](https://cloud.ibm.
2122

2223
<!-- toc -->
2324

24-
- [Overview](#overview)
25-
- [Prerequisites](#prerequisites)
26-
- [Installation](#installation)
27-
- [Using the SDK](#using-the-sdk)
28-
- [Questions](#questions)
29-
- [Issues](#issues)
30-
- [Open source @ IBM](#open-source--ibm)
31-
- [Contributing](#contributing)
32-
- [License](#license)
25+
- [NodeJS SDK for IBM Cloud Code Engine](#nodejs-sdk-for-ibm-cloud-code-engine)
26+
- [Table of Contents](#table-of-contents)
27+
- [Overview](#overview)
28+
- [Prerequisites](#prerequisites)
29+
- [Installation](#installation)
30+
- [Using the SDK](#using-the-sdk)
31+
- [Questions](#questions)
32+
- [Issues](#issues)
33+
- [Open source @ IBM](#open-source--ibm)
34+
- [Contributing](#contributing)
35+
- [License](#license)
3336

3437
<!-- tocstop -->
3538

commitlint.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
module.exports = { extends: ['@commitlint/config-conventional'] };

test-integration.sh

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Code Engine Node SDK Integration tests
2+
# Requires the following env. variables (provdied to TravisCI)
3+
# - CE_API_KEY: IBM Cloud API Key
4+
# - CE_PROJECT_ID: GUID of Code Engine project to target
5+
# - CE_PROJECT_REGION: region for API URL
6+
7+
echo "Running integration tests..."
8+
9+
# Setup example package
10+
cd example
11+
npm install
12+
13+
# Run example, get exit code
14+
exampleoutput=$(node ./example.js)
15+
exampleexit=$?
16+
if [ $exampleexit -ne 0 ]; then
17+
echo "Integration tests failed with exit code $exampleexit"
18+
echo $exampleoutput
19+
exit $exampleexit
20+
fi
21+
22+
# Check if output is expected
23+
outputcheck="2 configmaps"
24+
if [[ $exampleoutput != *$outputcheck* ]]; then
25+
echo "Intergration test output is incorrect:"
26+
echo "Expected '$exampleoutput' to contain '$outputcheck'"
27+
exit 1
28+
fi
29+
30+
echo "Success!"

0 commit comments

Comments
 (0)