|
| 1 | +# |
| 2 | +# Licensed to the Apache Software Foundation (ASF) under one |
| 3 | +# or more contributor license agreements. See the NOTICE file |
| 4 | +# distributed with this work for additional information |
| 5 | +# regarding copyright ownership. The ASF licenses this file |
| 6 | +# to you under the Apache License, Version 2.0 (the |
| 7 | +# "License"); you may not use this file except in compliance |
| 8 | +# with the License. You may obtain a copy of the License at |
| 9 | +# |
| 10 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 11 | +# |
| 12 | +# Unless required by applicable law or agreed to in writing, |
| 13 | +# software distributed under the License is distributed on an |
| 14 | +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| 15 | +# KIND, either express or implied. See the License for the |
| 16 | +# specific language governing permissions and limitations |
| 17 | +# under the License. |
| 18 | +# |
| 19 | + |
| 20 | +# https://github.com/actions/starter-workflows/blob/main/ci/python-package.yml |
| 21 | + |
| 22 | +# This workflow will install Python dependencies, run tests and lint with a variety of Python versions |
| 23 | +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python |
| 24 | + |
| 25 | +name: Python package |
| 26 | + |
| 27 | +on: |
| 28 | + push: |
| 29 | + pull_request: |
| 30 | + workflow_dispatch: |
| 31 | + |
| 32 | +jobs: |
| 33 | + |
| 34 | + test: |
| 35 | + runs-on: ubuntu-latest |
| 36 | + strategy: |
| 37 | + fail-fast: false |
| 38 | + matrix: |
| 39 | + # https://raw.githubusercontent.com/actions/python-versions/main/versions-manifest.json |
| 40 | + python-version: ["3.8", "3.9", "3.10", "3.11"] |
| 41 | + |
| 42 | + steps: |
| 43 | + - uses: actions/checkout@v3 |
| 44 | + |
| 45 | + - name: Set up Python ${{ matrix.python-version }} |
| 46 | + uses: actions/setup-python@v4 |
| 47 | + id: python |
| 48 | + with: |
| 49 | + python-version: ${{ matrix.python-version }} |
| 50 | + |
| 51 | + - name: Install dependencies |
| 52 | + run: | |
| 53 | + ${{ steps.python.outputs.python-path }} -m pip install --upgrade pip |
| 54 | + ${{ steps.python.outputs.python-path }} -m pip install python-qpid-proton |
| 55 | + ${{ steps.python.outputs.python-path }} -m pip install pytest pytest-timeout |
| 56 | +
|
| 57 | + - name: Prepare test environment |
| 58 | + run: | |
| 59 | + mkdir -p ${PWD}/artemis-data/override |
| 60 | + mkdir -p ${PWD}/qpid-dispatch |
| 61 | + cp ${PWD}/tests/.broker-00.xml ${PWD}/artemis-data/override/broker-00.xml |
| 62 | + cp ${PWD}/tests/.qdrouterd.conf ${PWD}/qpid-dispatch/qdrouterd.conf |
| 63 | + docker pull vromero/activemq-artemis |
| 64 | + docker pull rhmessagingqe/qpid-dispatch:ubuntu1804 |
| 65 | + docker run -v ${PWD}/artemis-data/override:/var/lib/artemis/etc-override:Z -p 5672:5672 -d vromero/activemq-artemis:2-latest |
| 66 | + docker run -v ${PWD}/qpid-dispatch:/var/lib/qdrouterd:Z -p 5673:5673 -d rhmessagingqe/qpid-dispatch:ubuntu1804 |
| 67 | + docker ps -a |
| 68 | +
|
| 69 | + - name: Install |
| 70 | + run: ${{ steps.python.outputs.python-path }} -m pip install . |
| 71 | + |
| 72 | + - name: Test |
| 73 | + run: | |
| 74 | + cd tests |
| 75 | + ${{ steps.python.outputs.python-path }} test_integration.py |
0 commit comments