Skip to content

Commit

Permalink
ci: migrate to new CI
Browse files Browse the repository at this point in the history
1. Migrate new CI GitHub Actions and Travis infrastructure
2. Standardise CI and Git hooks

Signed-off-by: Rifa Achrinza <25147899+achrinza@users.noreply.github.com>
  • Loading branch information
achrinza committed Aug 25, 2021
1 parent 64b8557 commit 207e9ad
Show file tree
Hide file tree
Showing 9 changed files with 8,513 additions and 5,853 deletions.
2 changes: 2 additions & 0 deletions .github/codeql/codeql-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
paths-ignore:
- test
100 changes: 100 additions & 0 deletions .github/workflows/continuous-integration.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
---
name: CI

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: [10, 12, 14, 16]
include:
- os: macos-latest
node-version: 14 # LTS
fail-fast: false
runs-on: ${{ matrix.os }}
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: Update NPM
run: npm install -g npm
- name: Bootstrap project
if: ${{ matrix.node-version != '8.11.1' }}
run: npm ci --ignore-scripts
- name: Bootstrap project (Node v8.11.1)
if: ${{ matrix.node-version == '8.11.1' }}
run: npm install --ignore-scripts
- name: Build project
run: npm run --ignore-scripts build
- name: Run tests
run: npm test --ignore-scripts
- name: troubleshooting
run: |
ls
ls ./coverage
- name: Coveralls Parallel
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.github_token }}
flag-name: run-${{ matrix.os }}-node@${{ matrix.node-version }}
path-to-lcov: ${{ github.workspace }}/coverage/lcov.info
parallel: true

posttest:
name: Post-Test
needs: test
runs-on: ubuntu-latest
steps:
- name: Coveralls Finish
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.github_token }}
parallel-finished: true

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
run: npm ci --ignore-scripts
- name: Verify commit linting
run: npx commitlint --from origin/master --to HEAD --verbose

codeql:
name: CodeQL
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: 'javascript'
config-file: ./.github/codeql/codeql-config.yaml
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
4 changes: 4 additions & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx --no-install commitlint --edit "$1"
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
package-lock=true
scripts-prepend-node-path=true
22 changes: 10 additions & 12 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
sudo: false
arch:
- ard64
- ppc64le
- s390x
language: node_js
notifications:
email: false
env:
NODE_OPTIONS: --max-old-space-size=4096
node_js:
- '10'
- '12'
- '14'
env:
- CXX=g++-4.8
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-4.8
- '16'
before_install: npm install -g npm
script:
- npm run citest
- npm run --ignore-scripts build
- npm test --ignore-scripts
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# strong-soap

[![CI](https://github.com/loopbackio/strong-soap/actions/workflows/continuous-integration.yaml/badge.svg)](https://github.com/loopbackio/strong-soap/actions/workflows/continuous-integration.yaml)
[![Build Status](https://app.travis-ci.com/loopbackio/strong-soap.svg?branch=master)](https://app.travis-ci.com/loopbackio/strong-soap)
[![Coverage Status](https://coveralls.io/repos/github/loopbackio/strong-soap/badge.svg?branch=master)](https://coveralls.io/github/loopbackio/strong-soap?branch=master)

This module provides a Node.js SOAP client for invoking web services and a mock-up SOAP server capability to create and test your web service. This module is based on `node-soap` module.

<!-- Run `npm run toc` to update below section -->
Expand Down
19 changes: 19 additions & 0 deletions commitlint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// Copyright IBM Corp. 2017,2021. All Rights Reserved.
// Node module: strong-soap
// This file is licensed under the MIT License.
// License text available at https://opensource.org/licenses/MIT

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:'],
},
};
Loading

0 comments on commit 207e9ad

Please sign in to comment.