Skip to content

Commit a1bc1b6

Browse files
committed
DX-3099 Update actions/checkout and actions/setup-*
Also Renamed `Validate` to `Test` and added matrix testing
1 parent ecada4c commit a1bc1b6

File tree

3 files changed

+68
-54
lines changed

3 files changed

+68
-54
lines changed

.github/workflows/Test.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
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+
node-version: ["12", "14", "16"]
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v3
19+
20+
- name: Setup Node
21+
uses: actions/setup-node@v3
22+
with:
23+
node-version: ${{ matrix.node-version }}
24+
25+
- name: NPM Install
26+
run: npm install
27+
28+
- name: NPM Build
29+
run: npm run build --if-present
30+
31+
- name: NPM Test
32+
run: npm run test --if-present
33+
env:
34+
BW_ACCOUNT_ID: ${{ secrets.BW_ACCOUNT_ID }}
35+
BW_USERNAME: ${{ secrets.BW_USERNAME }}
36+
BW_PASSWORD: ${{ secrets.BW_PASSWORD }}

.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/validate.yml

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

0 commit comments

Comments
 (0)