diff --git a/.github/workflows/lint_python.yml b/.github/workflows/lint_python.yml index 5dd37639e08..9ea78cad62b 100644 --- a/.github/workflows/lint_python.yml +++ b/.github/workflows/lint_python.yml @@ -2,6 +2,8 @@ name: lint_python on: [pull_request, push] jobs: lint_python: + # XXX: DO NOT MERGE THIS LINE + if: false runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 3b8a76982ac..0cf12078b30 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -20,6 +20,9 @@ on: jobs: Unit: + # XXX: DO NOT MERGE THIS LINE + if: false + runs-on: ubuntu-20.04 strategy: fail-fast: false @@ -76,26 +79,38 @@ jobs: Integration: + needs: + - Unit + # XXX: DO NOT MERGE THIS LINE + if: ${{ always() }} + + # XXX: We should set this to some reasonable maximum prior to merge. The + # default 6 hour timeout is far too long. + timeout-minutes: 15 + runs-on: ubuntu-20.04 strategy: fail-fast: false matrix: - python-version: ['3.7', '3.8', '3.9', 'pypy3'] + # XXX: RESTORE THIS MATRIX PRIOR TO MERGE + python-version: ['3.7', ] #'3.8', '3.9', 'pypy3'] + # XXX: Does each matrix variation get their own copy of the service + # containers? Test cross-talk may be an issue... + toxenv: ['redis', ] #'rabbitmq'] # additional service containers to run services: - # postgres service - rabbitmq: - # docker hub image - image: rabbitmq - # configure the instance - env: - RABBITMQ_DEFAULT_USER: craiga - RABBITMQ_DEFAULT_PASS: security_is_important - ports: - - 5432:5432 + #rabbitmq: + # # docker hub image + # image: rabbitmq + # # configure the instance + # env: + # # XXX: If we set these, we need to set TEST_{BROKER,BACKEND} URIs + # RABBITMQ_DEFAULT_USER: craiga + # RABBITMQ_DEFAULT_PASS: security_is_important + # ports: + # - 5432:5432 - # redis service redis: # Docker Hub image image: redis @@ -122,21 +137,21 @@ jobs: id: pip-cache run: | echo "::set-output name=dir::$(pip cache dir)" - - name: Cache - uses: actions/cache@v2 - with: - path: ${{ steps.pip-cache.outputs.dir }} - key: - ${{ matrix.python-version }}-v1-${{ hashFiles('**/setup.py') }} - restore-keys: | - ${{ matrix.python-version }}-v1- - - name: Install dependencies - run: | - python -m pip install -r requirements/dev.txt \ - -r requirements/test.txt \ - -r requirements/test-ci-default.txt \ - -r requirements/test-integration.txt - - - name: Run Integration test with pytest / tox /tox-docker + # XXX: What does this do? Does using tox change its usefulness? + #- name: Cache + # uses: actions/cache@v2 + # with: + # path: ${{ steps.pip-cache.outputs.dir }} + # key: + # ${{ matrix.python-version }}-v1-${{ hashFiles('**/setup.py') }} + # restore-keys: | + # ${{ matrix.python-version }}-v1- + + - name: Install tox + run: python -m pip install tox + - name: | + Run tox for + "${{ matrix.python-version }}-integration-${{ matrix.toxenv }}" run: | - PYTHONPATH=. pytest -xsv t/integration \ No newline at end of file + tox --verbose -e + "${{ matrix.python-version }}-integration-${{ matrix.toxenv }}"