mirror of
https://github.com/awesome-selfhosted/awesome-selfhosted.git
synced 2024-12-23 14:35:22 +01:00
Merge pull request #2199 from awesome-selfhosted/travis_test
Travis test
This commit is contained in:
commit
40ab55a72d
10
.travis.yml
10
.travis.yml
@ -15,14 +15,8 @@ before_script:
|
|||||||
script:
|
script:
|
||||||
- 'if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then git diff origin/master -U0 README.md | grep -Pos "(?<=^\+).*" >> temp.md; fi || (exit 0)'
|
- 'if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then git diff origin/master -U0 README.md | grep -Pos "(?<=^\+).*" >> temp.md; fi || (exit 0)'
|
||||||
- 'if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then node tests/test.js -r README.md -d temp.md; else node tests/test.js -r README.md; fi'
|
- 'if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then node tests/test.js -r README.md -d temp.md; else node tests/test.js -r README.md; fi'
|
||||||
- 'if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then if [ -f temp.md ]; then awesome_bot temp.md --allow-redirect --skip-save-results --allow 202 --white-list airsonic.github.io/docs/apps; else (exit 0); fi else awesome_bot *.md --allow-redirect --skip-save-results --allow 202 --white-list airsonic.github.io/docs/apps; fi'
|
- 'if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then awesome_bot temp.md --allow-redirect --skip-save-results --allow 202 --white-list airsonic.github.io/docs/apps; else (exit 0); fi'
|
||||||
|
- 'if [ "$TRAVIS_BRANCH" == "monthly-check" ]; then awesome_bot *.md --allow-redirect --skip-save-results --allow 202 --white-list airsonic.github.io/docs/apps; fi'
|
||||||
|
|
||||||
notifications:
|
notifications:
|
||||||
email: false
|
email: false
|
||||||
|
|
||||||
branches:
|
|
||||||
only:
|
|
||||||
- master
|
|
||||||
- travis_test
|
|
||||||
|
|
||||||
|
@ -57,7 +57,7 @@ function parseLicense(md) {
|
|||||||
|
|
||||||
//Test '- [Name](http://homepage/)'
|
//Test '- [Name](http://homepage/)'
|
||||||
function testMainLink(text) {
|
function testMainLink(text) {
|
||||||
let testA = /(^ {0,2}- \[.*?\]\(.*\))(?=.?-? ?\w)/;
|
let testA = /(^ {0,2}- \[.*?\]\([^)]*\.[^)]*?\))(?=\ ?\-?\ ?\w)/ // /(^ {0,2}- \[.*?\]\(.*\))(?=.?-? ?\w)/;
|
||||||
const testA1 = /(- \W?\w*\W{0,2}.*?\)?)( .*$)/;
|
const testA1 = /(- \W?\w*\W{0,2}.*?\)?)( .*$)/;
|
||||||
if (!testA.test(text)) {
|
if (!testA.test(text)) {
|
||||||
let a1 = testA1.exec(text)[2];
|
let a1 = testA1.exec(text)[2];
|
||||||
@ -81,9 +81,9 @@ function testDescription(text) {
|
|||||||
|
|
||||||
//If present, tests '([Demo](http://url.to/demo), [Source Code](http://url.of/source/code), [Clients](https://url.to/list/of/related/clients-or-apps))'
|
//If present, tests '([Demo](http://url.to/demo), [Source Code](http://url.of/source/code), [Clients](https://url.to/list/of/related/clients-or-apps))'
|
||||||
function testSrcDemCli(text) {
|
function testSrcDemCli(text) {
|
||||||
let testC = text.search(/\(\[|\)\,|\)\)/);
|
let testC = text.search(/\.\ \(|\.\ \[|\ \(\[[sSdDcC]/); // /\(\[|\)\,|\)\)/);
|
||||||
let testD = /(?<=\w. )(\(\[(Demo|Source Code|Clients)\]\([^)\]]*\)(, \[(Source Code|Clients)\]\([^)\]]*\))?(, \[(Source Code|Clients)\]\([^)\]]*\))*\))(?= \`?)/;
|
let testD = /(?<=\w. )(\(\[(Demo|Source Code|Clients)\]\([^)\]]*\)(, \[(Source Code|Clients)\]\([^)\]]*\))?(, \[(Source Code|Clients)\]\([^)\]]*\))*\))(?= \`?)/;
|
||||||
const testD1 = /(^- \W[a-zA-Z0-9-_ ]*\W{0,2}http[^\[]*)(?<= )/;
|
const testD1 = /(^- \W[a-zA-Z0-9-_ .]*\W{0,2}http[^\[]*)(?<= )/;
|
||||||
const testD2 = /(\`.*\` \`.*\`$)/;
|
const testD2 = /(\`.*\` \`.*\`$)/;
|
||||||
if ((testC > -1) && (!testD.test(text))) {
|
if ((testC > -1) && (!testD.test(text))) {
|
||||||
let d1 = testD1.exec(text)[1];
|
let d1 = testD1.exec(text)[1];
|
||||||
|
Loading…
Reference in New Issue
Block a user