summaryrefslogtreecommitdiff
path: root/.github/workflows/ci.yaml
blob: 89c76dd4fac1fbabb50eb3204609d7a9ef4cbc29 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
name: CI
on: [pull_request, push]
jobs:

  #################### Unittests ####################
  unittest:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        python-version: [3.7,3.8,3.9,"3.10","pypy-3.9"]
    steps:
      - name: Check out code from GitHub
        uses: actions/checkout@v3
      - name: Set up Python ${{ matrix.python-version }}
        id: python
        uses: actions/setup-python@v4
        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: [unittest]
    runs-on: ubuntu-latest
    strategy:
      matrix:
        python-version: [3.7,3.8,3.9,"3.10","pypy-3.9"]
    steps:
      - name: Check out code from GitHub
        uses: actions/checkout@v3
      - name: Build rabbitmq:tls container
        run: docker build -t rabbitmq:tls .
      - name: Set up Python ${{ matrix.python-version }}
        id: python
        uses: actions/setup-python@v4
        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 != 'pypy-3.9'}}

  #################### Linters and checkers ####################
  lint:
    needs: [unittest, integration]
    runs-on: ubuntu-latest
    strategy:
      matrix:
        python-version: [3.9]
    steps:
      - name: Check out code from GitHub
        uses: actions/checkout@v3
      - name: Set up Python ${{ matrix.python-version }}
        id: python
        uses: actions/setup-python@v4
        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