Skip to content

Commit

Permalink
ci: update envirnoment
Browse files Browse the repository at this point in the history
see: loopbackio/cicd#2
see: loopbackio/cicd#6
see: loopbackio/cicd#4

Signed-off-by: Rifa Achrinza <[email protected]>
  • Loading branch information
achrinza committed Mar 29, 2022
1 parent b87431f commit 5a86a2b
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 29 deletions.
47 changes: 24 additions & 23 deletions .github/workflows/continuous-integration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,35 +20,28 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
node-version: [10, 12, 14, 16]
node-version: [10, 12, 14, 16, 17]
include:
- os: macos-latest
node_version: 14
node_version: 16
- os: windows-latest
node_version: 14
node_version: 16
fail-fast: false
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Update NPM
if: matrix.os != 'macos-latest'
run: npm install --global npm
- name: Update NPM (macOS)
if: matrix.os == 'macos-latest'
run: npm install --global --force npm
- name: Bootstrap project
run: npm ci --ignore-scripts
- name: Run tests
run: npm test --ignore-scripts
run: npm run-script test:ci
- name: Publish coverage report to Coveralls
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:
Expand All @@ -66,11 +59,11 @@ jobs:
name: Code Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js 14
uses: actions/setup-node@v2
- uses: actions/checkout@v3
- name: Use Node.js 16
uses: actions/setup-node@v3
with:
node-version: 14
node-version: 16
- name: Bootstrap project
run: npm ci --ignore-scripts
- name: Verify code linting
Expand All @@ -80,17 +73,25 @@ jobs:
name: Commit Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Use Node.js 14
uses: actions/setup-node@v2
- name: Use Node.js 16
uses: actions/setup-node@v3
with:
node-version: 14
node-version: 16
- name: Bootstrap project
run: npm ci --ignore-scripts
- name: Verify commit linting
run: npx --no-install commitlint --from origin/master --to HEAD --verbose
run: |
npx \
--no-install \
--package=@commitlint/cli \
-- \
commitlint \
--from=origin/master \
--to=HEAD \
--verbose
codeql:
name: CodeQL
Expand All @@ -100,7 +101,7 @@ jobs:
security-events: write
steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Initialize CodeQL
uses: github/codeql-action/init@v1
Expand Down
12 changes: 7 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
branches:
only: master
only:
- master
arch:
- arm64
- ppc64le
- s390x
os: linux
dist: bionic
language: node_js
node_js:
- 10
- 12
- 14
- 16
install:
- npm install --global npm
- npm ci --ignore-scripts
script: npm test --ignore-scripts
- 17
install: npm ci --ignore-scripts
script: npm run-script test:ci
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
"lint": "eslint .",
"lint:fix": "eslint . --fix",
"posttest": "npm run lint",
"test": "nyc --reporter=lcov mocha"
"test": "npm run test:ci",
"test:ci": "nyc --reporter=lcov mocha"
},
"license": "MIT",
"dependencies": {
Expand Down

0 comments on commit 5a86a2b

Please sign in to comment.