Skip to content

Commit 8ee834e

Browse files
authored
Merge pull request #59 from Bandwidth/DX-3099
DX-3099 Update `actions/checkout` and `actions/setup-*`
2 parents ecada4c + 07fe098 commit 8ee834e

File tree

4 files changed

+71
-55
lines changed

4 files changed

+71
-55
lines changed

.github/workflows/deploy.yml

Lines changed: 32 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -9,31 +9,35 @@ jobs:
99
runs-on: ubuntu-latest
1010
if: ${{ !github.event.release.prerelease && github.event.release.target_commitish == 'main' }}
1111
steps:
12-
- name: Checkout
13-
uses: actions/checkout@v2
14-
- name: Set release version
15-
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/v}" >> $GITHUB_ENV
16-
- name: Setup Node
17-
uses: actions/setup-node@v1
18-
with:
19-
node-version: '12.x'
20-
registry-url: 'https://registry.npmjs.org'
21-
- name: Build and test npm package
22-
run: |
23-
npm install
24-
npm run test --if-present
25-
env:
26-
BW_ACCOUNT_ID: ${{ secrets.BW_ACCOUNT_ID }}
27-
BW_USERNAME: ${{ secrets.BW_USERNAME }}
28-
BW_PASSWORD: ${{ secrets.BW_PASSWORD }}
29-
BW_VOICE_APPLICATION_ID: ${{ secrets.BW_VOICE_APPLICATION_ID }}
30-
BW_MESSAGING_APPLICATION_ID: ${{ secrets.BW_MESSAGING_APPLICATION_ID }}
31-
BW_NUMBER: ${{ secrets.BW_NUMBER }}
32-
USER_NUMBER: ${{ secrets.USER_NUMBER }}
33-
BASE_CALLBACK_URL: ${{ secrets.BASE_CALLBACK_URL }}
34-
- name: Publish npm package
35-
run: |
36-
npm version $RELEASE_VERSION --no-git-tag-version
37-
npm publish --access public
38-
env:
39-
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
12+
- name: Checkout
13+
uses: actions/checkout@v3
14+
15+
- name: Set release version
16+
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/v}" >> $GITHUB_ENV
17+
18+
- name: Setup Node
19+
uses: actions/setup-node@v3
20+
with:
21+
node-version: "12.x"
22+
registry-url: "https://registry.npmjs.org"
23+
24+
- name: Build and test npm package
25+
run: |
26+
npm install
27+
npm run test --if-present
28+
env:
29+
BW_ACCOUNT_ID: ${{ secrets.BW_ACCOUNT_ID }}
30+
BW_USERNAME: ${{ secrets.BW_USERNAME }}
31+
BW_PASSWORD: ${{ secrets.BW_PASSWORD }}
32+
BW_VOICE_APPLICATION_ID: ${{ secrets.BW_VOICE_APPLICATION_ID }}
33+
BW_MESSAGING_APPLICATION_ID: ${{ secrets.BW_MESSAGING_APPLICATION_ID }}
34+
BW_NUMBER: ${{ secrets.BW_NUMBER }}
35+
USER_NUMBER: ${{ secrets.USER_NUMBER }}
36+
BASE_CALLBACK_URL: ${{ secrets.BASE_CALLBACK_URL }}
37+
38+
- name: Publish npm package
39+
run: |
40+
npm version $RELEASE_VERSION --no-git-tag-version
41+
npm publish --access public
42+
env:
43+
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}

.github/workflows/test.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Test
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- "main"
7+
8+
jobs:
9+
deploy:
10+
name: Test
11+
runs-on: ${{ matrix.os }}
12+
strategy:
13+
matrix:
14+
# os: [windows-2022, windows-2019, ubuntu-20.04, ubuntu-22.04]
15+
os: [ubuntu-20.04, ubuntu-22.04]
16+
node-version: ["12", "14", "16"]
17+
steps:
18+
- name: Checkout
19+
uses: actions/checkout@v3
20+
21+
- name: Setup Node
22+
uses: actions/setup-node@v3
23+
with:
24+
node-version: ${{ matrix.node-version }}
25+
26+
- name: NPM Install
27+
run: npm install
28+
29+
- name: NPM Build
30+
run: npm run build --if-present
31+
32+
- name: NPM Test
33+
run: npm run test --if-present
34+
env:
35+
BW_ACCOUNT_ID: ${{ secrets.BW_ACCOUNT_ID }}
36+
BW_USERNAME: ${{ secrets.BW_USERNAME }}
37+
BW_PASSWORD: ${{ secrets.BW_PASSWORD }}
38+
NODE_ENV: test

.github/workflows/validate.yml

Lines changed: 0 additions & 26 deletions
This file was deleted.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"description": "NodeJs Client library for Bandwidth Numbers API",
55
"main": "index.js",
66
"scripts": {
7-
"test": "NODE_ENV=test ./node_modules/.bin/istanbul cover ./node_modules/.bin/_mocha",
7+
"test": "./node_modules/.bin/istanbul cover ./node_modules/.bin/_mocha",
88
"windows-test": "./node_modules/.bin/istanbul cover ./node_modules/mocha/bin/_mocha"
99
},
1010
"repository": {

0 commit comments

Comments
 (0)