Skip to content

Commit 7c6e673

Browse files
committed
ci: update envirnoment
see: loopbackio/cicd#2 see: loopbackio/cicd#6 see: loopbackio/cicd#4 Signed-off-by: Rifa Achrinza <25147899+achrinza@users.noreply.github.com>
1 parent b87431f commit 7c6e673

File tree

2 files changed

+36
-26
lines changed

2 files changed

+36
-26
lines changed

.github/workflows/continuous-integration.yaml

Lines changed: 24 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -20,35 +20,28 @@ jobs:
2020
strategy:
2121
matrix:
2222
os: [ubuntu-latest]
23-
node-version: [10, 12, 14, 16]
23+
node-version: [10, 12, 14, 16, 17]
2424
include:
2525
- os: macos-latest
26-
node_version: 14
26+
node_version: 16
2727
- os: windows-latest
28-
node_version: 14
28+
node_version: 16
2929
fail-fast: false
3030
steps:
31-
- uses: actions/checkout@v2
31+
- uses: actions/checkout@v3
3232
- name: Use Node.js ${{ matrix.node-version }}
33-
uses: actions/setup-node@v1
33+
uses: actions/setup-node@v3
3434
with:
3535
node-version: ${{ matrix.node-version }}
36-
- name: Update NPM
37-
if: matrix.os != 'macos-latest'
38-
run: npm install --global npm
39-
- name: Update NPM (macOS)
40-
if: matrix.os == 'macos-latest'
41-
run: npm install --global --force npm
4236
- name: Bootstrap project
4337
run: npm ci --ignore-scripts
4438
- name: Run tests
45-
run: npm test --ignore-scripts
39+
run: npm test
4640
- name: Publish coverage report to Coveralls
4741
uses: coverallsapp/github-action@master
4842
with:
4943
github-token: ${{ secrets.GITHUB_TOKEN }}
5044
flag-name: run-${{ matrix.os }}-node@${{ matrix.node-version }}
51-
path-to-lcov: ${{ github.workspace }}/coverage/lcov.info
5245
parallel: true
5346

5447
posttest:
@@ -66,11 +59,11 @@ jobs:
6659
name: Code Lint
6760
runs-on: ubuntu-latest
6861
steps:
69-
- uses: actions/checkout@v2
70-
- name: Use Node.js 14
71-
uses: actions/setup-node@v2
62+
- uses: actions/checkout@v3
63+
- name: Use Node.js 16
64+
uses: actions/setup-node@v3
7265
with:
73-
node-version: 14
66+
node-version: 16
7467
- name: Bootstrap project
7568
run: npm ci --ignore-scripts
7669
- name: Verify code linting
@@ -80,17 +73,25 @@ jobs:
8073
name: Commit Lint
8174
runs-on: ubuntu-latest
8275
steps:
83-
- uses: actions/checkout@v2
76+
- uses: actions/checkout@v3
8477
with:
8578
fetch-depth: 0
86-
- name: Use Node.js 14
87-
uses: actions/setup-node@v2
79+
- name: Use Node.js 16
80+
uses: actions/setup-node@v3
8881
with:
89-
node-version: 14
82+
node-version: 16
9083
- name: Bootstrap project
9184
run: npm ci --ignore-scripts
9285
- name: Verify commit linting
93-
run: npx --no-install commitlint --from origin/master --to HEAD --verbose
86+
run: |
87+
npx \
88+
--no-install \
89+
--package=@commitlint/cli \
90+
-- \
91+
commitlint \
92+
--from=origin/master \
93+
--to=HEAD \
94+
--verbose
9495
9596
codeql:
9697
name: CodeQL
@@ -100,7 +101,7 @@ jobs:
100101
security-events: write
101102
steps:
102103
- name: Checkout repository
103-
uses: actions/checkout@v2
104+
uses: actions/checkout@v3
104105

105106
- name: Initialize CodeQL
106107
uses: github/codeql-action/init@v1

.travis.yml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,22 @@ arch:
44
- arm64
55
- ppc64le
66
- s390x
7+
os: linux
8+
dist: bionic
79
language: node_js
810
node_js:
911
- 10
1012
- 12
1113
- 14
1214
- 16
13-
install:
14-
- npm install --global npm
15-
- npm ci --ignore-scripts
15+
- 17
16+
before_install: |
17+
NODEJS_VERSION=$(node --version)
18+
if [ 'v10' = "${NODEJS_VERSION%%.*}" ]
19+
then
20+
npm install --global npm@7
21+
else
22+
npm install --global npm@8
23+
fi
24+
install: npm ci --ignore-scripts
1625
script: npm test --ignore-scripts

0 commit comments

Comments
 (0)