Skip to content

Commit

Permalink
Merge pull request #634 from loopbackio/ci/run-on-5.x-branch
Browse files Browse the repository at this point in the history
ci: add workflow for 5.x
  • Loading branch information
achrinza committed Jul 31, 2021
2 parents 2e36cb0 + 105756a commit baf0759
Show file tree
Hide file tree
Showing 4 changed files with 99 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/codeql/codeql-config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
paths-ignore: [test]
78 changes: 78 additions & 0 deletions .github/workflows/continuous-integration.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
name: Continuous Integration (5.x branch)

on:
push:
branches:
- 5.x
pull_request:
branches:
- 5.x

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [10, 12, 14]
mongodb-version: [4.4] # the latest stable version

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}

- name: Start MongoDB
uses: supercharge/[email protected]
with:
mongodb-version: ${{ matrix.mongodb-version }}

- run: npm install
- run: npm test

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
run: npm install --ignore-scripts
- name: Verify code linting
run: npm run lint

commit-lint:
name: Commit Lint
runs-on: ubuntu-latest
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
run: npm install
- name: Verify commit linting
run: npx commitlint --from origin/5.x --to HEAD --verbose

codeql:
name: CodeQL
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
18 changes: 18 additions & 0 deletions commitlint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// Copyright IBM Corp. 2012,2021. All Rights Reserved.
// Node module: loopback4-example-shopping-monorepo
// This file is licensed under the MIT License.
// License text available at https://opensource.org/licenses/MIT

'use strict';

module.exports = {
extends: [
'@commitlint/config-conventional',
],
rules: {
'header-max-length': [2, 'always', 100],
'body-leading-blank': [2, 'always'],
'footer-leading-blank': [0, 'always'],
'signed-off-by': [2, 'always', 'Signed-off-by:'],
},
};
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,10 @@
"strong-globalize": "^6.0.0"
},
"devDependencies": {
"@commitlint/config-conventional": "^13.1.0",
"benchmark": "^2.1.4",
"bluebird": "^3.5.4",
"commitlint": "^13.1.0",
"coveralls": "^3.0.4",
"eslint": "^6.6.0",
"eslint-config-loopback": "^13.0.0",
Expand Down

0 comments on commit baf0759

Please sign in to comment.