Skip to content

Commit 2700897

Browse files
committed
chore(workflow): update actions/setup-node@v2 to actions/setup-node@v3
1 parent 5895a18 commit 2700897

File tree

1 file changed

+24
-22
lines changed

1 file changed

+24
-22
lines changed

.github/workflows/run-tests.yml

Lines changed: 24 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@ jobs:
1212

1313
strategy:
1414
matrix:
15-
node-version: [lts/Iron]
15+
node-version: [lts/*]
1616

1717
steps:
1818
- uses: actions/checkout@v2
1919

2020
- name: Use Node.js ${{ matrix.node-version }}
21-
uses: actions/setup-node@v2
21+
uses: actions/setup-node@v3
2222
with:
2323
node-version: ${{ matrix.node-version }}
2424
cache: npm
@@ -48,13 +48,17 @@ jobs:
4848
run: npm run build
4949

5050
- name: Test Package Install
51-
run: npm version "5.0.0" --no-git-tag-version && npm pack && npm install -g ./sasjs-cli-5.0.0.tgz && sasjs v
51+
run: |
52+
npm version "5.0.0" --no-git-tag-version
53+
npm pack
54+
npm install -g ./sasjs-cli-5.0.0.tgz
55+
sasjs v
5256
5357
- name: Run smoke tests
5458
run: sh ./test.sh
5559

5660
- name: Install Doxygen
57-
run: sudo apt-get install doxygen
61+
run: sudo apt-get install -y doxygen
5862

5963
# Mocked (*.spec.ts) tests will be conducted during this step
6064
- name: Generate coverage report
@@ -63,23 +67,22 @@ jobs:
6367
github-token: ${{ secrets.GITHUB_TOKEN }}
6468
test-script: npx jest --config=jest.config.js --silent --runInBand --ci --coverage --testLocationInResults --json --outputFile="report.json"
6569

66-
- name: install pm2 for process management
70+
- name: Install PM2
6771
run: npm i -g pm2
6872

6973
- name: Create .env file for sasjs/server
7074
run: |
71-
touch .env
72-
echo RUN_TIMES=js >> .env
73-
echo NODE_PATH=node >> .env
74-
echo MOCK_SERVERTYPE=sas9 >> .env
75+
echo "RUN_TIMES=js" >> .env
76+
echo "NODE_PATH=node" >> .env
77+
echo "MOCK_SERVERTYPE=sas9" >> .env
7578
76-
- name: download sasjs/server package from github using curl
77-
run: curl -L https://github.com/sasjs/server/releases/latest/download/linux.zip > linux.zip
79+
- name: Download sasjs/server package
80+
run: curl -L https://github.com/sasjs/server/releases/latest/download/linux.zip -o linux.zip
7881

79-
- name: unzip downloaded package
82+
- name: Unzip downloaded package
8083
run: unzip linux.zip
8184

82-
- name: run sasjs server
85+
- name: Run sasjs server
8386
run: pm2 start api-linux
8487

8588
- name: Deploy SAS9 tests
@@ -90,16 +93,15 @@ jobs:
9093
ls sasjs_root -R
9194
9295
- name: Run server tests
93-
run: |
94-
npm run test:server
96+
run: npm run test:server
9597
env:
9698
CI: true
97-
CLIENT: ${{secrets.CLIENT}}
98-
SECRET: ${{secrets.SECRET}}
99-
SAS_USERNAME: ${{secrets.SAS_USERNAME}}
100-
SAS_PASSWORD: ${{secrets.SAS_PASSWORD}}
101-
VIYA_SERVER_URL: ${{secrets.VIYA_SERVER_URL}}
99+
CLIENT: ${{ secrets.CLIENT }}
100+
SECRET: ${{ secrets.SECRET }}
101+
SAS_USERNAME: ${{ secrets.SAS_USERNAME }}
102+
SAS_PASSWORD: ${{ secrets.SAS_PASSWORD }}
103+
VIYA_SERVER_URL: ${{ secrets.VIYA_SERVER_URL }}
102104
SAS9_SERVER_URL: http://localhost:5000
103105
SASJS_SERVER_URL: http://localhost:5000
104-
ACCESS_TOKEN: ${{secrets.ACCESS_TOKEN}}
105-
REFRESH_TOKEN: ${{secrets.REFRESH_TOKEN}}
106+
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}
107+
REFRESH_TOKEN: ${{ secrets.REFRESH_TOKEN }}

0 commit comments

Comments
 (0)