summaryrefslogtreecommitdiff
path: root/.github/workflows/codeqa_test.yaml
blob: 9449ace7ac398a7fd28e55edae771e8b0825a135 (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
name: Python codeqa/test

on:
  push:
    branches: [3.x]
  pull_request:

jobs:
  lint:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v3
    - name: Set up Python
      uses: actions/setup-python@v4
      with:
        python-version: 3.x
    - uses: actions/cache@v3
      with:
        path: ~/.cache/pip
        key: pip-lint
    - name: Install dependencies
      run: pip install tox
    - name: Run flake8
      run: tox -e flake8

  test-linux:
    needs: [lint]
    strategy:
      fail-fast: false
      matrix:
        python-version: ["3.7", "3.11"]
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v3
    - name: Set up Python ${{ matrix.python-version }}
      uses: actions/setup-python@v4
      with:
        python-version: ${{ matrix.python-version }}
    - uses: actions/cache@v3
      with:
        path: ~/.cache/pip
        key: pip-test-${{ matrix.python-version }}-ubuntu-latest
    - name: Start external services
      run: docker-compose up -d
    - name: Install the project and its dependencies
      run: pip install -e .[testing,asyncio,gevent,mongodb,redis,rethinkdb,sqlalchemy,tornado,twisted,zookeeper]
    - name: Test with pytest
      run: pytest