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