-
Notifications
You must be signed in to change notification settings - Fork 4
Added support for proxy, updated packages and more. #21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
034c9f3
d79ec1c
1cd9186
25cad3d
efbf9d6
2d25296
da88be3
8e7c71e
4a91c1a
a27c898
ebbeccb
d02764e
b758197
158107f
7017104
34df1bc
a8c8c38
501cb64
8603dea
e0e69d9
5cc318d
4000186
a9249f8
daa0196
e3626e1
49ac328
4171587
50484e4
da5e40e
28cf72c
ac766e3
9657338
bb8dd38
ba850d5
7620d15
c31d3bf
59e0296
d98106a
aa7eb27
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,71 @@ | ||
| # For most projects, this workflow file will not need changing; you simply need | ||
| # to commit it to your repository. | ||
| # | ||
| # You may wish to alter this file to override the set of languages analyzed, | ||
| # or to provide custom queries or build logic. | ||
| # | ||
| # ******** NOTE ******** | ||
| # We have attempted to detect the languages in your repository. Please check | ||
| # the `language` matrix defined below to confirm you have the correct set of | ||
| # supported CodeQL languages. | ||
| # | ||
| name: "CodeQL" | ||
|
|
||
| on: | ||
| push: | ||
| branches: [ master ] | ||
| pull_request: | ||
| # The branches below must be a subset of the branches above | ||
| branches: [ master ] | ||
| schedule: | ||
| - cron: '24 1 * * 1' | ||
|
|
||
| jobs: | ||
| analyze: | ||
| name: Analyze | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| actions: read | ||
| contents: read | ||
| security-events: write | ||
|
|
||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| language: [ 'javascript' ] | ||
| # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ] | ||
| # Learn more: | ||
| # https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed | ||
|
|
||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v2 | ||
|
|
||
| # Initializes the CodeQL tools for scanning. | ||
| - name: Initialize CodeQL | ||
| uses: github/codeql-action/init@v1 | ||
| with: | ||
| languages: ${{ matrix.language }} | ||
| # If you wish to specify custom queries, you can do so here or in a config file. | ||
| # By default, queries listed here will override any specified in a config file. | ||
| # Prefix the list here with "+" to use these queries and those in the config file. | ||
| # queries: ./path/to/local/query, your-org/your-repo/queries@main | ||
|
|
||
| # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). | ||
| # If this step fails, then you should remove it and run the build manually (see below) | ||
| - name: Autobuild | ||
| uses: github/codeql-action/autobuild@v1 | ||
|
|
||
| # ℹ️ Command-line programs to run using the OS shell. | ||
| # 📚 https://git.io/JvXDl | ||
|
|
||
| # ✏️ If the Autobuild fails above, remove it and uncomment the following three lines | ||
| # and modify them (or add more) to build your code if your project | ||
| # uses a compiled language | ||
|
|
||
| #- run: | | ||
| # make bootstrap | ||
| # make release | ||
|
|
||
| - name: Perform CodeQL Analysis | ||
| uses: github/codeql-action/analyze@v1 | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,3 +4,4 @@ node_modules/ | |
| *~ | ||
| .DS_Store | ||
| npm_debug.log | ||
| .idea | ||
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -8,6 +8,11 @@ const { loadYamlFile } = require('./util.js'); | |
| const apiPort = new ApiPort(); | ||
| apiPort.init(); | ||
|
|
||
| let tagsArray = []; | ||
| if (process.env.TAGS) { | ||
| tagsArray = process.env.TAGS.split(','); | ||
| } | ||
|
|
||
| if (apiPort.get('API_TESTS_PATH')) { | ||
| const paths = klawSync(apiPort.get('API_TESTS_PATH'), { nodir: true }); | ||
| if (paths) { | ||
|
|
@@ -18,6 +23,34 @@ if (apiPort.get('API_TESTS_PATH')) { | |
| apiPort.currentFile = filePath; | ||
| const config = loadYamlFile(filePath); | ||
| describe(filePath, () => { | ||
| let tagsInTest = []; | ||
| if (tagsInTest) { | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is always true. Empty arrays are not "falsey". So, this block always executes. Just remove the if. Unless you meant to check something that might be false - like the |
||
| if (!Array.isArray(config.apiCalls.tag)) { | ||
| tagsInTest = [config.apiCalls.tag]; | ||
| } else { | ||
| tagsInTest = config.apiCalls.tag; | ||
| } | ||
| } | ||
| if (tagsArray.length > 0) { | ||
| let tagMatched = false; | ||
| for (const tagInArgs of tagsArray) { | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Use |
||
| for (const tagInTest of tagsInTest) { | ||
| if (`${tagInArgs}` === `${tagInTest}`) { | ||
| tagMatched = true; | ||
| break; | ||
| } | ||
| } | ||
| if (tagMatched) { | ||
| break; | ||
| } | ||
| } | ||
|
|
||
| if (!tagMatched) { | ||
| console.error(`The tags ${config.apiCalls.tag || 'empty'} in file: ${filePath} does not match the expected tags: ${tagsArray || 'empty'}`); | ||
| return false; | ||
| } | ||
| } | ||
|
|
||
| const describeMethod = config.only ? describe.only : describe; | ||
| describeMethod( | ||
| (config.apiCalls || {}).name || 'unnamed', | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.