diff options
Diffstat (limited to '.github/workflows/ci.yaml')
-rw-r--r-- | .github/workflows/ci.yaml | 70 |
1 files changed, 70 insertions, 0 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'}} |