diff options
author | Leo Balter <leonardo.balter@gmail.com> | 2017-04-11 14:00:07 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-04-11 14:00:07 -0400 |
commit | d2ee888bf0ea1daaf0a27028621999791854d6c8 (patch) | |
tree | fcf74617676d5d76128188184b7bf6d5ae5afeff | |
parent | 4dbd704904cdb98898d47ecf24ad560e47a84fcc (diff) | |
download | qtdeclarative-testsuites-d2ee888bf0ea1daaf0a27028621999791854d6c8.tar.gz |
Improve readability for ci scripts (#966)
-rw-r--r-- | .travis.yml | 42 | ||||
-rw-r--r-- | tools/scripts/ci.sh | 11 | ||||
-rw-r--r-- | tools/scripts/deploy.sh | 24 |
3 files changed, 41 insertions, 36 deletions
diff --git a/.travis.yml b/.travis.yml index e53ac1328..b669f0b6a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,38 +1,8 @@ language: python install: pip install pyyaml -script: | - if [ $TRAVIS_PULL_REQUEST != "false" ]; then - ./make.py clean - fi - echo "PULL_REQUEST: '${TRAVIS_PULL_REQUEST}'" - ./make.py - if [ -n "$(git status --porcelain)" -a $TRAVIS_PULL_REQUEST != "false" ]; then - echo New changes were found after re-generating the tests. - echo Please, read the documentation on procedurally generated tests - echo 'https://github.com/tc39/test262/blob/master/CONTRIBUTING.md#procedurally-generated-tests' - exit 1 - fi -deploy: | - if [ $TRAVIS_EVENT_TYPE != "push" -o $TRAVIS_BRANCH != "master" ]; then - echo This job is not running against a commit that has been merged to master. - echo Skipping deployment. - exit 0 - fi - openssl aes-256-cbc \ - -K $encrypted_7b3e5998334d_key \ - -iv $encrypted_7b3e5998334d_iv \ - -in github-deploy-key.enc \ - -out github-deploy-key \ - -d - chmod 600 github-deploy-key - eval "$(ssh-agent -s)" - ssh-add github-deploy-key - rm github-deploy-key - git config --global user.email "test262@ecma-international.org" - git config --global user.name "Test262 Automation Script" - # The repository on TravisCI is a shallow clone, so the `master` branch must - # be retrieved explicitly, and a local branch created from the `FETCH_HEAD` - # git reference - git fetch origin master - git branch master FETCH_HEAD - ./make.py deploy +script: + - echo The test generation tool should be working. + - ./tools/generation/test/run.py + - sh ./tools/scripts/ci.sh +deploy: + - sh ./tools/scripts/deploy.sh diff --git a/tools/scripts/ci.sh b/tools/scripts/ci.sh new file mode 100644 index 000000000..478880c2a --- /dev/null +++ b/tools/scripts/ci.sh @@ -0,0 +1,11 @@ +#!/bin/sh +if [ $TRAVIS_PULL_REQUEST != "false" ]; then + ./make.py clean +fi +./make.py +if [ -n "$(git status --porcelain)" -a $TRAVIS_PULL_REQUEST != "false" ]; then + echo New changes were found after re-generating the tests. + echo Please, read the documentation on procedurally generated tests + echo 'https://github.com/tc39/test262/blob/master/CONTRIBUTING.md#procedurally-generated-tests' + exit 1 +fi diff --git a/tools/scripts/deploy.sh b/tools/scripts/deploy.sh new file mode 100644 index 000000000..37fbb6d25 --- /dev/null +++ b/tools/scripts/deploy.sh @@ -0,0 +1,24 @@ +#!/bin/sh +if [ $TRAVIS_EVENT_TYPE != "push" -o $TRAVIS_BRANCH != "master" ]; then + echo This job is not running against a commit that has been merged to master. + echo Skipping deployment. + exit 0 +fi +openssl aes-256-cbc \ + -K $encrypted_7b3e5998334d_key \ + -iv $encrypted_7b3e5998334d_iv \ + -in github-deploy-key.enc \ + -out github-deploy-key \ + -d +chmod 600 github-deploy-key +eval "$(ssh-agent -s)" +ssh-add github-deploy-key +rm github-deploy-key +git config --global user.email "test262@ecma-international.org" +git config --global user.name "Test262 Automation Script" +# The repository on TravisCI is a shallow clone, so the `master` branch must +# be retrieved explicitly, and a local branch created from the `FETCH_HEAD` +# git reference +git fetch origin master +git branch master FETCH_HEAD +./make.py deploy |