-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Rifa Achrinza <[email protected]>
- Loading branch information
Showing
21 changed files
with
6,537 additions
and
106 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
paths-ignore: | ||
- '**/test/**' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: "CodeQL" | ||
|
||
on: | ||
push: | ||
branches: [master] | ||
pull_request: | ||
# The branches below must be a subset of the branches above | ||
branches: [master] | ||
schedule: | ||
- cron: '0 13 * * 6' | ||
|
||
jobs: | ||
analyze: | ||
name: Analyze | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Initialize CodeQL | ||
uses: github/codeql-action/init@v1 | ||
with: | ||
languages: 'javascript' | ||
config-file: ./.github/codeql/codeql-config.yml | ||
|
||
- name: Perform CodeQL Analysis | ||
uses: github/codeql-action/analyze@v1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
name: Continuous Integration | ||
|
||
on: | ||
push: | ||
branches: [master] | ||
pull_request: | ||
# The branches below must be a subset of the branches above | ||
branches: [master] | ||
schedule: | ||
- cron: '0 2 * * 1' # At 02:00 on Monday | ||
|
||
env: | ||
NODE_OPTIONS: --max-old-space-size=4096 | ||
|
||
jobs: | ||
test: | ||
name: Test | ||
timeout-minutes: 15 | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest] | ||
node-version: [8.9, 10, 12, 14, 16] | ||
db2-service-image: ['ibmcom/db2:latest', 'ibmcom/db2:11.5.0.0'] | ||
fail-fast: false | ||
runs-on: ${{ matrix.os }} | ||
services: | ||
db2: | ||
image: ${{ matrix.db2-service-image }} | ||
env: | ||
DBNAME: testdb | ||
DB2INSTANCE: db2inst1 | ||
DB2INST1_PASSWORD: CIDBPassword123 | ||
LICENSE: accept | ||
ports: ['50000:50000'] | ||
options: >- | ||
--health-cmd='db2 ping hostdb' | ||
--health-timeout=0 | ||
--privileged | ||
env: | ||
DB2_USERNAME: db2inst1 | ||
DB2_PASSWORD: CIDBPassword123 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
- name: Bootstrap project | ||
if: ${{ matrix.node-version != '8.9' }} | ||
run: npm ci | ||
- name: Bootstrap project (Node v8.9) | ||
if: ${{ matrix.node-version == '8.9' }} | ||
run: npm install | ||
- name: Run tests | ||
run: | | ||
npm run pretest --ignore-scripts | ||
npm test --ignore-scripts | ||
code-lint: | ||
name: Code Lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Use Node.js 14 | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: 14 | ||
- name: Bootstrap project | ||
if: ${{matrix.node-version != '8.9'}} | ||
run: npm ci | ||
- name: Bootstrap project (Node v8.9) | ||
if: ${{matrix.node-version == '8.9'}} | ||
run: npm install | ||
- name: Verify code linting | ||
run: npm run lint | ||
|
||
commit-lint: | ||
name: Commit Lint | ||
runs-on: ubuntu-latest | ||
if: ${{ github.event.pull_request }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- name: Use Node.js 14 | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: 14 | ||
- name: Bootstrap project | ||
if: ${{matrix.node-version != '8.9'}} | ||
run: npm ci | ||
- name: Bootstrap project (Node v8.9) | ||
if: ${{matrix.node-version == '8.9'}} | ||
run: npm install | ||
- name: Verify commit linting | ||
run: npx commitlint --from origin/master --to HEAD --verbose |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
package-lock=true | ||
scripts-prepend-node-path=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
arch: | ||
- ppc64le | ||
- s390x | ||
- arm64 | ||
language: node_js | ||
services: [docker] | ||
node_js: [8.9, 9, 10, 12, 14, 16] | ||
|
||
env: | ||
DB2_USERNAME: db2inst1 | ||
DB2_PASSWORD: CIDBPassword123 | ||
|
||
before_install: | ||
- | | ||
docker pull ibmcom/db2 | ||
docker run ibmcom/db2 \ | ||
-d \ | ||
-p 25000:25000 \ | ||
-e DBNAME=testdb\ | ||
-e DB2INSTANCE=db2inst1 \ | ||
-e DB2INST1_PASSWORD=CIDBPassword123 \ | ||
-e LICENSE=accept | ||
- | | ||
docker pull ibmcom/db2:11.5.0.0 | ||
docker run ibmcom/db2 | ||
-d \ | ||
-p 25000:25000 \ | ||
-e DBNAME=testdb\ | ||
-e DB2INSTANCE=db2inst1 \ | ||
-e DB2INST1_PASSWORD=CIDBPassword123 \ | ||
-e LICENSE=accept |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
// Copyright IBM Corp. 2017,2018. All Rights Reserved. | ||
// Node module: loopback-next | ||
// This file is licensed under the MIT License. | ||
// License text available at https://opensource.org/licenses/MIT | ||
'use strict'; | ||
|
||
const isCI = process.env.CI; | ||
module.exports = { | ||
extends: [ | ||
'@commitlint/config-conventional', | ||
], | ||
rules: { | ||
'header-max-length': [2, 'always', 100], | ||
'body-leading-blank': [2, 'always'], | ||
'footer-leading-blank': [0, 'always'], | ||
// Only enforce the rule if CI flag is not set. This is useful for release | ||
// commits to skip DCO | ||
'signed-off-by': [isCI ? 0 : 2, 'always', 'Signed-off-by:'], | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.