Skip to content

fix: bumping core #1115

fix: bumping core

fix: bumping core #1115

# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
name: Run mocked tests on Windows
on:
pull_request:
jobs:
test:
runs-on: windows-latest
strategy:
matrix:
node-version: [lts/iron]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: npm
- uses: ssciwr/doxygen-install@v1
with:
version: '1.9.3'
- name: Check doxygen version
run: doxygen -v
- name: Create .env file for sasjs/server
run: |
echo RUN_TIMES=js >> .env
echo NODE_PATH=node >> .env
- name: Download sasjs/server package from GitHub
run: curl -L https://github.com/sasjs/server/releases/latest/download/windows.zip --output windows.zip
- name: Unzip downloaded package
run: npx extract-zip windows.zip
- name: Start sasjs server in background
run: START .\api-win.exe >> run-sasjs-server.txt
- name: Install dependencies
run: |
npm config set registry http://registry.npmjs.org
npm ci
- name: Check code style
run: npm run lint
- name: Install rimraf
run: npm i -g rimraf
- name: Build Project
run: npm run build
- name: Test Package Install
run: |
npm version "5.0.0" --no-git-tag-version
npm pack
npm install -g ./sasjs-cli-5.0.0.tgz
sasjs v
- name: npm prefix for user
run: echo prefix=C:\npm\prefix >> ~\.npmrc
- name: Sasjs Server started
run: cat run-sasjs-server.txt
- name: Run mocked tests
run: npm run test:mocked
env:
CI: true
CLIENT: ${{ secrets.CLIENT }}
SECRET: ${{ secrets.SECRET }}
SAS_USERNAME: ${{ secrets.SAS_USERNAME }}
SAS_PASSWORD: ${{ secrets.SAS_PASSWORD }}
VIYA_SERVER_URL: ${{ secrets.VIYA_SERVER_URL }}
SAS9_SERVER_URL: ${{ secrets.SAS9_SERVER_URL }}
SASJS_SERVER_URL: 'http://localhost:5000'
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}
REFRESH_TOKEN: ${{ secrets.REFRESH_TOKEN }}