diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 616d22d055..0000000000 --- a/.travis.yml +++ /dev/null @@ -1,57 +0,0 @@ -sudo: required - -services: -- docker - -env: - global: - # define DOCKER_USERNAME and DOCKER_PASSWORD - - secure: "NZZCFpX/ubtrMHxU3C6+HkV+mrSUIAqRLXKySBiUJeiKaOsiVUl1AMd1cKQOrDp59dIFmjMvH+HGFbAKt3QvTcTImx0yye09bsXNKUKIQbVElnoZvkP6pZSxXAFcmjZdUGTfMSMkLukrXHgLb5ob2ziBCinJBoG57tgcUJnoZTc=" - - secure: "d4TXRnQ4QffUFILVN6Hn7DA55unGDk0H6vZsmDRxP3ucLrUC/j8ko3Tm9jDeHZvVxGUe/e0dNXQ1WjaialCpB/h+rrnCEFExk9+oeUhhzn9GVOp488jqoiIwQxYM8cEh5I8Fh8lztBwaLnaI/MgRougFuOs3Ocf3v2IhBgvcwGs=" - -before_install: -- sudo apt-get -qq update -# add coveralls -- sudo apt-get -y install python3 python3-pip python3-setuptools -- sudo pip3 install --upgrade pip -- sudo pip3 install coveralls -# upgrade docker, for build argument support -- sudo apt-get install -o Dpkg::Options::="--force-confold" --force-yes -y docker-ce -- docker version -- docker ps -a -# get the current PR and branch name -- sudo apt-get -y install jq -- export PR=https://api.github.com/repos/$TRAVIS_REPO_SLUG/pulls/$TRAVIS_PULL_REQUEST -- export BRANCH=$(if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then echo $TRAVIS_BRANCH; else echo `curl -s $PR | jq -r .head.ref`; fi) -- echo $PR -- echo $BRANCH -# determine the docker image tag name ("nopush" being a placeholder to signify the image will not be pushed to dockerhub) -- export DOCKER_TAG="nopush" -- | - if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then - if [ "$BRANCH" == "master" ]; then export DOCKER_TAG="latest"; fi - if [ "$BRANCH" == "develop" ]; then export DOCKER_TAG="develop"; fi - fi -- echo $DOCKER_TAG -# try to check out the same branch for counterparty-lib (if it exists), and fallback to the develop branch if not -- if curl --output /dev/null --silent --head --fail "https://github.com/CounterpartyXCP/counterparty-cli/tree/$BRANCH"; then export DOCKERFILE_CLI_BRANCH="$BRANCH"; else export DOCKERFILE_CLI_BRANCH="develop"; fi -- echo $DOCKERFILE_CLI_BRANCH -# build docker image -- docker build -t counterparty/counterparty-server:$DOCKER_TAG --build-arg CLI_BRANCH="$DOCKERFILE_CLI_BRANCH" . - -script: -# run the test suite in the docker container we just made -- docker run --entrypoint=/bin/bash counterparty/counterparty-server:$DOCKER_TAG -c "cd /counterparty-lib/counterpartylib; py.test --verbose --skiptestbook=all --cov-config=../.coveragerc --cov-report=term-missing --cov=./" - -after_success: -- coveralls -# if it's master or develop, then push the appropirately tagged docker image (otherwise don't push anything) -- | - if [ "$DOCKER_TAG" != "nopush" ]; then - docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD"; - docker push counterparty/counterparty-server:$DOCKER_TAG; - fi - -notifications: - slack: - secure: cl0G5fWZNnIK5VQ6BPZ4RtwVO2/nfvX/zjhljfF6cQ20OKyvyiJHq+e67fl2pkCKDlqlEqSWaQJ6G52YzUpDQmf+o7qpH6YnkFxSqYp5h4YF1hJw4sCHJ7bVSLrjogWxU8QaNvH7YpL4YkGe+WOau2FgoIZOcMt6hhKrvWclfuc= diff --git a/circle.yml b/circle.yml deleted file mode 100644 index 6b625e5e29..0000000000 --- a/circle.yml +++ /dev/null @@ -1,104 +0,0 @@ -# See: https://circleci.com/docs/2.0/configuration-reference -version: 2.1 - -orbs: - python: circleci/python@2.0.3 - -jobs: - build: - docker: - - image: cimg/python:3.11.6 - - steps: - - checkout - - - run: - name: Run counterparty-lib setup and install - command: | - pip install --upgrade pip - pip install hatch - - - persist_to_workspace: - root: ~/ - paths: - - . - - test: - docker: - - image: cimg/python:3.11.6 - - steps: - - attach_workspace: - at: ~/ - - - run: - name: "Run tests" - command: | - curl https://sh.rustup.rs -sSf | sh -s -- -y - source "$HOME/.cargo/env" - cd counterparty-lib - mkdir test-results - hatch run pytest --junitxml=test-results/junit.xml --verbose --cov-config=.coveragerc --cov-report=term-missing --cov=./ counterpartylib - - - store_test_results: - path: test-results - - test-book-testnet: - docker: - - image: cimg/python:3.11.6 - - steps: - - attach_workspace: - at: ~/ - - - run: - name: "Get latest testnet db file" - command: | - mkdir -p ~/.local/share/counterparty - wget https://counterparty.io/bootstrap/counterparty-db-testnet-7.latest.tar.gz -O ~/.local/share/counterparty/counterparty-db-testnet.latest.tar.gz - tar -C ~/.local/share/counterparty -xvzf ~/.local/share/counterparty/counterparty-db-testnet.latest.tar.gz - - - run: - name: "Run testnet book test" - command: | - mkdir test-results - hatch run pytest --junitxml=test-results/junit.xml --log-cli-level=INFO --show-capture=no --testbook=testnet -k test_book counterpartylib/test/book_test.py - - - store_test_results: - path: test-results - - test-book-mainnet: - docker: - - image: cimg/python:3.11.6 - - steps: - - attach_workspace: - at: ~/ - - - run: - name: "Get latest mainnet db file" - command: | - mkdir -p ~/.local/share/counterparty - wget https://counterparty.io/bootstrap/counterparty-db.latest.tar.gz -O ~/.local/share/counterparty/counterparty-db.latest.tar.gz - tar -C ~/.local/share/counterparty -xvzf ~/.local/share/counterparty/counterparty-db.latest.tar.gz - - - run: - name: "Run mainnet book test" - command: | - mkdir test-results - hatch run pytest --junitxml=test-results/junit.xml --log-cli-level=INFO --show-capture=no --testbook=mainnet -k test_book counterpartylib/test/book_test.py - - - store_test_results: - path: test-results - - -workflows: - build-and-test: - jobs: - - build - - test: - requires: - - build - #- test-book-testnet: - # requires: - # - build \ No newline at end of file