diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml new file mode 100644 index 0000000..d316dc8 --- /dev/null +++ b/.github/workflows/run-tests.yml @@ -0,0 +1,59 @@ +# 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: Node.js CI + +on: + pull_request: + +jobs: + test: + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [12.x] + + steps: + - uses: actions/checkout@v2 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node-version }} + + - name: Install Doxygen + run: sudo apt-get install doxygen + + - name: Install dependencies + run: npm ci + + - name: Check code style + run: npm run lint + + - name: Add client + run: echo "CLIENT=${{secrets.CLIENT}}"> .env.viya + + - name: Add secret + run: echo "SECRET=${{secrets.SECRET}}" >> .env.viya + + - name: Add access token + run: echo "ACCESS_TOKEN=${{secrets.ACCESS_TOKEN}}" >> .env.viya + + - name: Add refresh token + run: echo "REFRESH_TOKEN=${{secrets.REFRESH_TOKEN}}" >> .env.viya + + - name: Build Project + run: npm run build + + - name: Run SASjs tests + run: npm run test + env: + CI: true + CLIENT: ${{secrets.CLIENT}} + SECRET: ${{secrets.SECRET}} + SAS_USERNAME: ${{secrets.SAS_USERNAME}} + SAS_PASSWORD: ${{secrets.SAS_PASSWORD}} + SERVER_URL: ${{secrets.SERVER_URL}} + SERVER_TYPE: ${{secrets.SERVER_TYPE}} + ACCESS_TOKEN: ${{secrets.ACCESS_TOKEN}} + REFRESH_TOKEN: ${{secrets.REFRESH_TOKEN}} diff --git a/README.md b/README.md index e50faaa..fa66941 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,23 @@ -![](https://badgen.net/github/release/sasjs/core) [![Dependency Status](https://david-dm.org/sasjs/core.svg)](/package.json) ![npm](https://img.shields.io/npm/dt/@sasjs/core) ![example workflow](https://github.com/sasjs/core/actions/workflows/main.yml/badge.svg) ![Snyk Vulnerabilities for npm package](https://img.shields.io/snyk/vulnerabilities/npm/@sasjs/core) - -[![License](https://img.shields.io/apm/l/atomic-design-ui.svg)](/LICENSE) ![GitHub top language](https://img.shields.io/github/languages/top/sasjs/core) ![total lines](https://tokei.rs/b1/github/sasjs/core)[![Gitpod ready-to-code](https://img.shields.io/badge/Gitpod-ready--to--code-908a85?logo=gitpod)](https://gitpod.io/#https://github.com/sasjs/core) - - # Macro Core +[![npm package][npm-image]][npm-url] +[![Github Workflow][githubworkflow-image]][githubworkflow-url] +[![Dependency Status][dependency-image]][dependency-url] +[![npm](https://img.shields.io/npm/dt/@sasjs/core)]() +![Snyk Vulnerabilities for npm package](https://img.shields.io/snyk/vulnerabilities/npm/@sasjs/core) +[![License](https://img.shields.io/apm/l/atomic-design-ui.svg)](/LICENSE) +![GitHub top language](https://img.shields.io/github/languages/top/sasjs/core) +![total lines](https://tokei.rs/b1/github/sasjs/core) +[![Gitpod ready-to-code](https://img.shields.io/badge/Gitpod-ready--to--code-908a85?logo=gitpod)](https://gitpod.io/#https://github.com/sasjs/core) + + +[npm-image]:https://img.shields.io/npm/v/@sasjs/core.svg +[npm-url]:http://npmjs.org/package/@sasjs/core +[githubworkflow-image]:https://github.com/sasjs/core/actions/workflows/main.yml/badge.svg +[githubworkflow-url]:https://github.com/sasjs/core/blob/main/.github/workflows/main.yml +[dependency-image]:https://david-dm.org/sasjs/core.svg +[dependency-url]:https://github.com/sasjs/core/blob/main/package.json + + Much quality. Many standards. The **Macro Core** library exists to save time and development effort! Herein ye shall find a veritable host of MIT-licenced, production quality SAS macros. These are a mix of tools, utilities, functions and code generators that are useful in the context of [Application Development](https://sasapps.io) on the SAS platform (eg https://datacontroller.io). [Contributions](https://github.com/sasjs/core/blob/main/CONTRIBUTING.md) are welcomed. @@ -159,4 +173,7 @@ When contributing to this library, it is therefore important to ensure that all If you find this library useful, help us grow our star graph! -![](https://starchart.cc/sasjs/core.svg) \ No newline at end of file +![](https://starchart.cc/sasjs/core.svg) + + + diff --git a/package.json b/package.json index 054378e..820841f 100644 --- a/package.json +++ b/package.json @@ -26,8 +26,10 @@ "homepage": "https://core.sasjs.io", "main": "index.js", "scripts": { + "build": "sasjs cbd -t viya", + "docs": "sasjs doc && ./sasjs/utils/build.sh", "test": "sasjs test -t viya", - "docs": "sasjs doc && ./sasjs/utils/build.sh" + "lint": "sasjs lint" }, "devDependencies": { "@sasjs/cli": "^2.19.3",