Move tests into subdir, QA

This commit is contained in:
Manuel Schmid 2020-11-09 19:30:28 +01:00
parent 42da7067e8
commit e13a2c7791
No known key found for this signature in database
GPG Key ID: A5FC376D86033B79
5 changed files with 5 additions and 9 deletions

View File

@ -25,6 +25,6 @@ jobs:
- name: Install Dependencies
# if: steps.cache.outputs.cache-hit != 'true'
run: npm ci --ignore-scripts --no-audit --no-progress --prefer-offline
- run: npm run test
- run: npm run test-pr
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

1
.gitignore vendored
View File

@ -8,4 +8,5 @@ dist
website/index.html
website/table.html
.idea
**/.DS_Store

View File

@ -5,7 +5,7 @@
"main": "build.js",
"scripts": {
"build": "rimraf ./dist/ && node build.js",
"test": "node pull_request.js"
"test-pr": "node tests/pull_request.js"
},
"repository": {
"type": "git",

View File

@ -17,7 +17,6 @@ const LINKS_OPTIONS = {
},
};
const LOG = {
error: (...args) => console.error('❌ ERROR', args),
error_string: (...args) =>
@ -86,12 +85,6 @@ async function batch_fetch({ arr, get, post_filter_func, BATCH_SIZE = 8 }) {
return result;
}
const extract_repos = (arr) =>
arr
.map((e) => e.substr('https://github.com/'.length).split('/'))
.filter((r) => r.length === 2 && r[1] !== '');
const exclude_length = exclude.length;
const exclude_from_list = (link) => {
let is_excluded = false;
@ -144,6 +137,8 @@ async function main() {
console.log(`checking ${github_links.length} GitHub repositories...`);
console.log(`skipping GitHub repository check. Run "npm run test" to execute them manually.`);
console.log({
TEST_PASSED: !has_error.show,
EXTERNAL_LINKS: external_links.length,