|
| 1 | +# This workflow will check package installation and runs tests in pre-release branch |
| 2 | +# On Ubuntu, Windows and MacOS |
| 3 | +# Triggered by push to develop |
| 4 | +name: Test package dev mode |
| 5 | + |
| 6 | +on: |
| 7 | + push: |
| 8 | + branches: |
| 9 | + - develop |
| 10 | + |
| 11 | +jobs: |
| 12 | + installation: |
| 13 | + strategy: |
| 14 | + matrix: |
| 15 | + os: [ubuntu-latest, windows-latest, macos-latest] |
| 16 | + python-version: [3.6, 3.7, 3.8, 3.9] |
| 17 | + |
| 18 | + runs-on: ${{ matrix.os }} |
| 19 | + |
| 20 | + steps: |
| 21 | + - uses: actions/checkout@v2 |
| 22 | + with: |
| 23 | + submodules: true |
| 24 | + - name: Set up Python ${{ matrix.python-version }} |
| 25 | + uses: actions/setup-python@v1 |
| 26 | + with: |
| 27 | + python-version: ${{ matrix.python-version }} |
| 28 | + - name: Install poetry |
| 29 | + run: | |
| 30 | + pip install poetry |
| 31 | + shell: bash |
| 32 | + - name: Set poetry env |
| 33 | + run: | |
| 34 | + poetry config virtualenvs.create false |
| 35 | + poetry install --no-root --no-dev |
| 36 | + pip install taskipy cython |
| 37 | + task build -f sdist |
| 38 | + pip uninstall --yes taskipy cython |
| 39 | + shell: bash |
| 40 | + - name: Install package artifact |
| 41 | + run: | |
| 42 | + pip install dist/dxfeed* |
| 43 | + pip uninstall --yes dxfeed |
| 44 | + shell: bash |
| 45 | + tests: |
| 46 | + needs: installation |
| 47 | + strategy: |
| 48 | + matrix: |
| 49 | + os: [ubuntu-latest, windows-latest, macos-latest] |
| 50 | + python-version: [3.6, 3.7, 3.8, 3.9] |
| 51 | + |
| 52 | + runs-on: ${{ matrix.os }} |
| 53 | + |
| 54 | + steps: |
| 55 | + - uses: actions/checkout@v2 |
| 56 | + with: |
| 57 | + submodules: true |
| 58 | + - name: Set up Python ${{ matrix.python-version }} |
| 59 | + uses: actions/setup-python@v1 |
| 60 | + with: |
| 61 | + python-version: ${{ matrix.python-version }} |
| 62 | + - name: Install poetry |
| 63 | + run: | |
| 64 | + pip install poetry |
| 65 | + shell: bash |
| 66 | + - name: Set poetry env |
| 67 | + run: | |
| 68 | + poetry config virtualenvs.create false |
| 69 | + poetry install --no-root |
| 70 | + shell: bash |
| 71 | + - name: Run tests |
| 72 | + run: | |
| 73 | + task test |
| 74 | + shell: bash |
| 75 | + - name: Generate doc |
| 76 | + run: | |
| 77 | + task html_docs |
| 78 | + shell: bash |
| 79 | + if: matrix.os == 'ubuntu-latest' && matrix.python-version == 3.7 |
0 commit comments