|
| 1 | +name: Test installation |
| 2 | + |
| 3 | +on: |
| 4 | + pull_request: |
| 5 | + branches: |
| 6 | + - master |
| 7 | + |
| 8 | +jobs: |
| 9 | + |
| 10 | +# ----------------------------------------- |
| 11 | +# Use a module from local source |
| 12 | +# ----------------------------------------- |
| 13 | + use_as_local_module: |
| 14 | + |
| 15 | + strategy: |
| 16 | + fail-fast: false |
| 17 | + matrix: |
| 18 | + os: [ubuntu-latest, macos-latest, windows-latest] |
| 19 | + python-version: [3.8, 3.9] |
| 20 | + |
| 21 | + runs-on: ${{ matrix.os }} |
| 22 | + |
| 23 | + steps: |
| 24 | + - uses: actions/checkout@v2 |
| 25 | + |
| 26 | + - name: Set up Python ${{ matrix.python-version }} on ${{ matrix.os }} |
| 27 | + uses: actions/setup-python@v2 |
| 28 | + with: |
| 29 | + python-version: ${{ matrix.python-version }} |
| 30 | + |
| 31 | + - name: Install requirements |
| 32 | + run: | |
| 33 | + pip install --user -U pip |
| 34 | + pip install --user -r requirements.txt |
| 35 | +
|
| 36 | + - name: Run 'import nbtools' |
| 37 | + run: python -c 'import nbtools' |
| 38 | + |
| 39 | + |
| 40 | + |
| 41 | +# ----------------------------------------- |
| 42 | +# Install with pip |
| 43 | +# ----------------------------------------- |
| 44 | + install_with_pip: |
| 45 | + |
| 46 | + strategy: |
| 47 | + fail-fast: false |
| 48 | + matrix: |
| 49 | + os: [ubuntu-latest, macos-latest, windows-latest] |
| 50 | + python-version: [3.8, 3.9] |
| 51 | + |
| 52 | + runs-on: ${{ matrix.os }} |
| 53 | + |
| 54 | + steps: |
| 55 | + - name: Set up Python ${{ matrix.python-version }} on ${{ matrix.os }} |
| 56 | + uses: actions/setup-python@v2 |
| 57 | + with: |
| 58 | + python-version: ${{ matrix.python-version }} |
| 59 | + |
| 60 | + - name: Install with pip |
| 61 | + run: | |
| 62 | + pip install --user -U pip |
| 63 | + pip install wheel |
| 64 | + pip install --user git+https://github.com/${{ github.event.pull_request.head.repo.full_name }}.git@${{ github.head_ref }}#egg=py-nbtools |
| 65 | +
|
| 66 | + - name: Run 'import nbtools' |
| 67 | + run: python -c 'import nbtools' |
0 commit comments