Skip to content
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

CI: Don't to run the tests if only the docs were updated (WIP) #6999

Closed
wants to merge 11 commits into from
33 changes: 22 additions & 11 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,14 @@ before_install:
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install sfml; fi

before_script:
- |
if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then
TRAVIS_COMMIT_RANGE="FETCH_HEAD...$TRAVIS_BRANCH"
fi
git diff --name-only $TRAVIS_COMMIT_RANGE | grep -qvE '(\.md$)|(\.txt$)(\.rst)|(^(doc|icons|web|))/' || {
echo "Only the docs were updated, the tests will not run."
export SKIPTESTS="true"
}
- set -e
- git clone --depth 1 https://github.com/nim-lang/csources.git
- cd csources
Expand All @@ -35,18 +43,21 @@ script:
- nim c koch
- ./koch boot
- ./koch boot -d:release
- ./koch nimble
- nim e tests/test_nimscript.nims
- nimble install zip -y
- nimble install opengl
- nimble install sdl1
- nimble install jester@#head
- nimble install niminst
- nim c --taintMode:on -d:nimCoroutines tests/testament/tester
- tests/testament/tester --pedantic all -d:nimCoroutines
- |
if [ "$SKIPTESTS" != "true" ]; then
./koch nimble
nim e tests/test_nimscript.nims
nimble install zip -y
nimble install opengl
nimble install sdl1
nimble install jester@#head
nimble install niminst
nim c --taintMode:on -d:nimCoroutines tests/testament/tester
tests/testament/tester --pedantic all -d:nimCoroutines
./koch csource
./koch nimsuggest
fi
- ./koch web
- ./koch csource
- ./koch nimsuggest
# - nim c -r nimsuggest/tester
- ( ! grep -F '.. code-block' -l -r --include '*.html' --exclude contributing.html --exclude docgen.html --exclude tut2.html )
- ( ! grep -F '..code-block' -l -r --include '*.html' --exclude contributing.html --exclude docgen.html --exclude tut2.html )
31 changes: 22 additions & 9 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,25 +37,38 @@ install:
- IF "%PLATFORM%" == "x64" ( copy %CD%\DIST\sqlite3.dll %CD%\BIN\sqlite3_64.dll ) ELSE ( copy %CD%\DIST\sqlite3.dll %CD%\BIN\sqlite3_32.dll )
- IF "%PLATFORM%" == "x64" ( copy %CD%\DIST\PCRE\pcre.redist.8.33.0.1\build\native\bin\v100\x64\Release\dynamic\utf8\pcre8.dll %CD%\bin\pcre64.dll ) ELSE ( copy %CD%\DIST\PCRE\pcre.redist.8.33.0.1\build\native\bin\v100\Win32\Release\dynamic\utf8\pcre8.dll %CD%\bin\pcre32.dll )
- git clone --depth 1 https://github.com/nim-lang/csources
- dir
- cd csources
- IF "%PLATFORM%" == "x64" ( build64.bat ) else ( build.bat )
- cd ..
- set COMMIT_RANGE="FETCH_HEAD...%APPVEYOR_PULL_REQUEST_HEAD_COMMIT%"
- echo %COMMIT_RANGE%
- echo %APPVEYOR_REPO_COMMIT%
# - git diff --name-only %COMMIT_RANGE%
- dir
- git diff --name-only
# - git diff --name-only %APPVEYOR_REPO_COMMIT%
# - git diff --name-only %APPVEYOR_REPO_COMMIT% | grep -vE "(\.md$)|(\.txt$)(\.rst)|(^(doc|icons|web|))/"

build_script:
- bin\nim c koch
- koch boot -d:release
- koch nimble
- nim e tests/test_nimscript.nims
- nimble install zip -y
- nimble install opengl
- nimble install sdl1
- nimble install jester@#head
- nimble install niminst
- nim c --taintMode:on -d:nimCoroutines tests/testament/tester
# - koch nimble
# - nim e tests/test_nimscript.nims
# - nimble install zip -y
# - nimble install opengl
# - nimble install sdl1
# - nimble install jester@#head
# - nimble install niminst
# - nim c --taintMode:on -d:nimCoroutines tests/testament/tester

test_script:
- tests\testament\tester --pedantic all -d:nimCoroutines
# - tests\testament\tester --pedantic all -d:nimCoroutines
# - koch csource
# - koch zip
- koch web
# - nim c -r nimsuggest/tester
- ( ! grep -F '.. code-block' -l -r --include '*.html' --exclude contributing.html --exclude docgen.html --exclude tut2.html )
- ( ! grep -F '..code-block' -l -r --include '*.html' --exclude contributing.html --exclude docgen.html --exclude tut2.html )

deploy: off