async-worker/async-worker

View on GitHub
.github/workflows/pull-request.yaml

Summary

Maintainability
Test Coverage
name: pull-request

on:
  pull_request:

jobs:
  tests:
    name: unittests
    runs-on: ubuntu-latest
    strategy:
      fail-fast: false
      matrix:
        python: ['3.9', '3.10', '3.11', '3.x']
    services:
      rabbitmq:
        image: rabbitmq:3.7-management-alpine
        ports:
          - 5672:5672
          - 15672:15672
    steps:
      - name: install libxml2-dev
        run: sudo apt-get install libxml2-dev libxslt-dev
      - name: checkout
        uses: actions/checkout@v2

      - name: Install python ${{matrix.python}}
        uses: actions/setup-python@v2
        with:
          python-version: ${{matrix.python}}

      - name: Install pip/pipenv
        run: pip install -U pip==22.0.4 pipenv==2022.4.30

      - name: pipenv install --dev
        run: pipenv install --system --deploy --ignore-pipfile --dev

      - name: pipenv run test
        run: pipenv run all-tests

      - name: Coverage upload
        if: env.CC_TEST_REPORTER_ID && matrix.python_version == '3.11'
        uses: paambaati/codeclimate-action@v2.7.5
        env:
          CC_TEST_REPORTER_ID: ${{secrets.CC_TEST_REPORTER_ID}}
      - name: Coverage Skipped
        if: ${{matrix.python != '3.11'}}
        run: echo "Coverage uploaded only on python 3.11 run"

  lint:
    name: lint
    runs-on: ubuntu-latest
    steps:
      - name: checkout
        uses: actions/checkout@v2

      - name: Install python 3.11
        uses: actions/setup-python@v2
        with:
          python-version: 3.11

      - name: Install pip/pipenv
        run: pip install -U pip==22.3.1 pipenv==2023.2.4

      - name: pipenv install --dev
        run: pipenv install --system --deploy --ignore-pipfile --dev

      - name: pipenv run lint
        run: pipenv run lint

      - name: pipenv run fmt-check
        run: pipenv run fmt-check

      - name: pipenv run isort-check
        run: pipenv run isort-check