From 4b67e13b2480c5f2f769ecf135fd69bcb38c7c71 Mon Sep 17 00:00:00 2001 From: Allan Bowe Date: Sat, 15 May 2021 23:31:50 +0300 Subject: [PATCH 01/10] chore: travis yaml --- .travis.yml | 7 +++++++ README.md | 29 +++++++++++++++++++++++------ 2 files changed, 30 insertions(+), 6 deletions(-) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..b029c50 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,7 @@ +language: node_js +node_js: + - "10" + - "12" + - "14" + +sudo: false 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) + + + From 055669c133a104c52dd78a4dda5268648959b298 Mon Sep 17 00:00:00 2001 From: Allan Bowe Date: Sat, 15 May 2021 23:41:41 +0300 Subject: [PATCH 02/10] fix: adding test action --- .github/workflows/run-tests.yml | 47 +++++++++++++++++++++++++++++++++ package.json | 4 ++- 2 files changed, 50 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/run-tests.yml diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml new file mode 100644 index 0000000..0bbdd6d --- /dev/null +++ b/.github/workflows/run-tests.yml @@ -0,0 +1,47 @@ +# 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: 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/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", From 5c144be05b77aa3dfb82f8a1a0bd5d5e25deeb0b Mon Sep 17 00:00:00 2001 From: Allan Bowe Date: Sun, 16 May 2021 00:00:01 +0300 Subject: [PATCH 03/10] chore: automated commit --- .github/workflows/run-tests.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 0bbdd6d..5a0c8e0 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -30,9 +30,20 @@ jobs: - name: Check code style run: npm run lint + - name: Add secrets + run: cat > .env.viya <<'EOL' + test1 + test2 + EOL + + - name: check add + run: cat .env.viya + - name: Build Project run: npm run build + + - name: Run SASjs tests run: npm run test env: From e456da846a9ff24450b891e41cb03e411203c008 Mon Sep 17 00:00:00 2001 From: Allan Bowe Date: Sun, 16 May 2021 00:03:13 +0300 Subject: [PATCH 04/10] chore: automated commit --- .github/workflows/run-tests.yml | 5 +---- .travis.yml => .travis.yml2 | 0 2 files changed, 1 insertion(+), 4 deletions(-) rename .travis.yml => .travis.yml2 (100%) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 5a0c8e0..2de9ef8 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -31,10 +31,7 @@ jobs: run: npm run lint - name: Add secrets - run: cat > .env.viya <<'EOL' - test1 - test2 - EOL + run: echo "client=\nsecret=\n" > .env.viya - name: check add run: cat .env.viya diff --git a/.travis.yml b/.travis.yml2 similarity index 100% rename from .travis.yml rename to .travis.yml2 From c81794b5422bcf68aa096a92a9a1038bd922d89d Mon Sep 17 00:00:00 2001 From: Allan Bowe Date: Sun, 16 May 2021 00:08:10 +0300 Subject: [PATCH 05/10] chore: automated commit --- .github/workflows/run-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 2de9ef8..057dc4d 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -31,7 +31,7 @@ jobs: run: npm run lint - name: Add secrets - run: echo "client=\nsecret=\n" > .env.viya + run: echo $"CLIENT=\SECRET=\nACCESS_TOKEN=\nREFRESH_TOKEN=" > .env.viya - name: check add run: cat .env.viya From 39a7b332dafb107484d8d1a531608ab08200309b Mon Sep 17 00:00:00 2001 From: Allan Bowe Date: Sun, 16 May 2021 00:12:35 +0300 Subject: [PATCH 06/10] chore: automated commit --- .github/workflows/run-tests.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 057dc4d..5d1df18 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -31,7 +31,10 @@ jobs: run: npm run lint - name: Add secrets - run: echo $"CLIENT=\SECRET=\nACCESS_TOKEN=\nREFRESH_TOKEN=" > .env.viya + run: echo "CLIENT="> .env.viya + run: echo "SECRET=" >> .env.viya + run: echo "ACCESS_TOKEN=" >> .env.viya + run: echo "REFRESH_TOKEN=" >> .env.viya - name: check add run: cat .env.viya From 6ae892989daa938101b3cc398adcf850d9b1a245 Mon Sep 17 00:00:00 2001 From: Allan Bowe Date: Sun, 16 May 2021 00:14:37 +0300 Subject: [PATCH 07/10] chore: automated commit --- .github/workflows/run-tests.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 5d1df18..6131514 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -30,10 +30,16 @@ jobs: - name: Check code style run: npm run lint - - name: Add secrets + - name: Add client run: echo "CLIENT="> .env.viya + + - name: Add secret run: echo "SECRET=" >> .env.viya + + - name: Add access token run: echo "ACCESS_TOKEN=" >> .env.viya + + - name: Add refresh token run: echo "REFRESH_TOKEN=" >> .env.viya - name: check add From 27fbdf193bdac66afcf3ce56dd84616bab24bfb4 Mon Sep 17 00:00:00 2001 From: Allan Bowe Date: Sun, 16 May 2021 00:15:52 +0300 Subject: [PATCH 08/10] chore: automated commit --- .github/workflows/run-tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 6131514..6f91cf6 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -31,10 +31,10 @@ jobs: run: npm run lint - name: Add client - run: echo "CLIENT="> .env.viya + run: echo "CLIENT=${{secrets.CLIENT}}"> .env.viya - name: Add secret - run: echo "SECRET=" >> .env.viya + run: echo "SECRET=${{secrets.SECRET}}" >> .env.viya - name: Add access token run: echo "ACCESS_TOKEN=" >> .env.viya From df8f8893e783ffedeb4366ccc2b9cfe57218ff27 Mon Sep 17 00:00:00 2001 From: Allan Bowe Date: Sun, 16 May 2021 00:16:59 +0300 Subject: [PATCH 09/10] chore: automated commit --- .github/workflows/run-tests.yml | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 6f91cf6..d316dc8 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -37,19 +37,14 @@ jobs: run: echo "SECRET=${{secrets.SECRET}}" >> .env.viya - name: Add access token - run: echo "ACCESS_TOKEN=" >> .env.viya + run: echo "ACCESS_TOKEN=${{secrets.ACCESS_TOKEN}}" >> .env.viya - name: Add refresh token - run: echo "REFRESH_TOKEN=" >> .env.viya - - - name: check add - run: cat .env.viya + 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: From b2877bd4933701b5374df61845074df723146203 Mon Sep 17 00:00:00 2001 From: Allan Bowe Date: Sun, 16 May 2021 00:25:04 +0300 Subject: [PATCH 10/10] chore: automated commit --- .travis.yml2 | 7 ------- 1 file changed, 7 deletions(-) delete mode 100644 .travis.yml2 diff --git a/.travis.yml2 b/.travis.yml2 deleted file mode 100644 index b029c50..0000000 --- a/.travis.yml2 +++ /dev/null @@ -1,7 +0,0 @@ -language: node_js -node_js: - - "10" - - "12" - - "14" - -sudo: false