diff options
-rw-r--r-- | .github/workflows/ci.yaml | 70 | ||||
-rw-r--r-- | .travis.yml | 83 | ||||
-rw-r--r-- | tox.ini | 8 |
3 files changed, 74 insertions, 87 deletions
diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 0000000..5e1e85a --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,70 @@ +name: CI +on: [pull_request, push] +jobs: + #################### Linters and checkers #################### + lint: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: [3.8] + steps: + - name: Check out code from GitHub + uses: actions/checkout@v2.3.4 + - name: Set up Python ${{ matrix.python-version }} + id: python + uses: actions/setup-python@v2.2.1 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: pip install --upgrade pip setuptools wheel tox tox-docker + - name: Run flake8 + run: tox -v -e py-flake8 -- -v + - name: Run pydocstyle + run: tox -v -e py-pydocstyle -- -v + - name: Run apicheck + run: tox -v -e py-apicheck -- -v + #################### Unittests #################### + unittest: + needs: lint + runs-on: ubuntu-latest + strategy: + matrix: + python-version: [3.6,3.7,3.8,pypy3] + steps: + - name: Check out code from GitHub + uses: actions/checkout@v2.3.4 + - name: Set up Python ${{ matrix.python-version }} + id: python + uses: actions/setup-python@v2.2.1 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: pip install --upgrade pip setuptools wheel tox tox-docker + - name: Run unittest + run: tox -v -e ${{ matrix.python-version }}-unit -- -v + #################### Integration tests #################### + integration: + needs: [lint, unittest] + runs-on: ubuntu-latest + strategy: + matrix: + python-version: [3.6,3.7,3.8,pypy3] + steps: + - name: Check out code from GitHub + uses: actions/checkout@v2.3.4 + - name: Build rabbitmq:tls container + run: docker build -t rabbitmq:tls . + - name: Set up Python ${{ matrix.python-version }} + id: python + uses: actions/setup-python@v2.2.1 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: pip install --upgrade pip setuptools wheel tox tox-docker + - name: Run integration tests + run: tox -v -e ${{ matrix.python-version }}-integration-rabbitmq -- -v + - name: Run integration tests with speedups enabled + run: | + CELERY_ENABLE_SPEEDUPS=1 python setup.py develop + tox -v -e ${{ matrix.python-version }}-integration-rabbitmq -- -v + if: ${{ matrix.python-version != 'pypy3'}} diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 6aef248..0000000 --- a/.travis.yml +++ /dev/null @@ -1,83 +0,0 @@ -language: python -sudo: required -dist: bionic -cache: pip -python: - - '3.6' - - '3.7' - - '3.8' - - 'pypy3.6-7.3.1' - -env: - global: - PYTHONUNBUFFERED=yes - matrix: - - MATRIX_TOXENV=unit - -stages: - - test - - integration - - lint - -_integration_job: &integration_job - script: - - docker build -t rabbitmq:tls . - - tox -v -- -v - services: - - docker - stage: integration - -matrix: - fast_finish: true - include: - - python: 3.8 - env: TOXENV=flake8 - stage: lint - - python: 3.8 - env: TOXENV=pydocstyle - stage: lint - - python: 3.8 - env: TOXENV=apicheck - stage: lint - - python: 3.6 - <<: *integration_job - env: MATRIX_TOXENV=integration-rabbitmq - - python: 3.7 - <<: *integration_job - env: MATRIX_TOXENV=integration-rabbitmq - - python: 3.8 - <<: *integration_job - env: MATRIX_TOXENV=integration-rabbitmq - services: - - docker - stage: integration - - python: pypy3.6-7.3.1 - <<: *integration_job - env: MATRIX_TOXENV=integration-rabbitmq - - python: 3.6 - <<: *integration_job - env: MATRIX_TOXENV=integration-rabbitmq CELERY_ENABLE_SPEEDUPS=1 - - python: 3.7 - <<: *integration_job - env: MATRIX_TOXENV=integration-rabbitmq CELERY_ENABLE_SPEEDUPS=1 - - python: 3.8 - <<: *integration_job - env: MATRIX_TOXENV=integration-rabbitmq CELERY_ENABLE_SPEEDUPS=1 - - -before_install: - - if [[ -v MATRIX_TOXENV ]]; then export TOXENV=${TRAVIS_PYTHON_VERSION}-${MATRIX_TOXENV}; fi; env -install: - - pip --disable-pip-version-check install -U pip setuptools wheel | cat - - pip --disable-pip-version-check install -U --upgrade-strategy eager tox tox-docker | cat - - python setup.py develop -script: tox -v -- -v -after_success: - - .tox/$TRAVIS_PYTHON_VERSION/bin/coverage xml - - .tox/$TRAVIS_PYTHON_VERSION/bin/codecov -e TOXENV -notifications: - irc: - channels: - - "chat.freenode.net#celery" - on_success: change - on_failure: change @@ -1,7 +1,7 @@ [tox] envlist = - {pypy3.6-7.3.1,3.6,3.7,3.8}-unit - {pypy3.6-7.3.1,3.6,3.7,3.8}-integration-rabbitmq + {pypy3,3.6,3.7,3.8}-unit + {pypy3,3.6,3.7,3.8}-integration-rabbitmq flake8 flakeplus apicheck @@ -23,7 +23,7 @@ commands = integration: py.test -xv -E rabbitmq t/integration {posargs:-n2} basepython = flake8,apicheck,linkcheck,pydocstyle: python3.8 - pypy3.6-7.3.1: pypy + pypy3: pypy 3.6: python3.6 3.7: python3.7 3.8: python3.8 @@ -37,7 +37,7 @@ dockerenv = RABBITMQ_SERVER_ADDITIONAL_ERL_ARGS=-rabbit tcp_listeners [5672] [docker:rabbitmq] -image = rabbitmq +image = rabbitmq:tls ports = 5672:5672/tcp 5671:5671/tcp |