|
| 1 | +name: Build |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: ["main"] |
| 6 | + pull_request: |
| 7 | +# schedule: |
| 8 | +# - cron: "0 0 * * *" |
| 9 | + |
| 10 | +defaults: |
| 11 | + run: |
| 12 | + shell: bash -eux {0} |
| 13 | + |
| 14 | +jobs: |
| 15 | + build: |
| 16 | + runs-on: ubuntu-latest |
| 17 | + strategy: |
| 18 | + fail-fast: false |
| 19 | + matrix: |
| 20 | + os: [ubuntu-latest, macos-latest, windows-latest] |
| 21 | + python-version: [ '3.8', '3.9', '3.10', "3.11" ] |
| 22 | + |
| 23 | + steps: |
| 24 | + - name: Checkout |
| 25 | + uses: actions/checkout@v2 |
| 26 | + |
| 27 | + - name: Base Setup |
| 28 | + uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1 |
| 29 | + |
| 30 | + - name: Install dependencies |
| 31 | + run: python -m pip install -U jupyter_server |
| 32 | + |
| 33 | + - name: Build the extension |
| 34 | + run: | |
| 35 | + python -m pip install . |
| 36 | + jupyter server extension list 2>&1 | grep -ie "message_replay.*OK" |
| 37 | +
|
| 38 | + pip install build |
| 39 | + python -m build --sdist |
| 40 | + cp dist/*.tar.gz my_server_extension.tar.gz |
| 41 | + pip uninstall -y "message_replay" jupyter_server |
| 42 | + rm -rf "message_replay" |
| 43 | +
|
| 44 | + - uses: actions/upload-artifact@v2 |
| 45 | + with: |
| 46 | + name: my_server_extension-sdist |
| 47 | + path: my_server_extension.tar.gz |
| 48 | + |
| 49 | + check_links: |
| 50 | + runs-on: ubuntu-latest |
| 51 | + steps: |
| 52 | + - uses: actions/checkout@v2 |
| 53 | + - uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1 |
| 54 | + - uses: jupyterlab/maintainer-tools/.github/actions/check-links@v1 |
| 55 | + |
| 56 | + test_lint: |
| 57 | + runs-on: ubuntu-latest |
| 58 | + steps: |
| 59 | + - uses: actions/checkout@v2 |
| 60 | + - uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1 |
| 61 | + - name: Run Linters |
| 62 | + run: | |
| 63 | + bash ./.github/workflows/lint.sh |
| 64 | +
|
| 65 | + check_release: |
| 66 | + runs-on: ubuntu-latest |
| 67 | + steps: |
| 68 | + - uses: actions/checkout@v2 |
| 69 | + - name: Base Setup |
| 70 | + uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1 |
| 71 | + - name: Install Dependencies |
| 72 | + run: | |
| 73 | + pip install -e . |
| 74 | + - name: Check Release |
| 75 | + uses: jupyter-server/jupyter_releaser/.github/actions/check-release@v2 |
| 76 | + with: |
| 77 | + token: ${{ secrets.GITHUB_TOKEN }} |
| 78 | + - name: Upload Distributions |
| 79 | + uses: actions/upload-artifact@v2 |
| 80 | + with: |
| 81 | + name: message_replay-releaser-dist-${{ github.run_number }} |
| 82 | + path: .jupyter_releaser_checkout/dist |
| 83 | + |
| 84 | + test_sdist: |
| 85 | + needs: build |
| 86 | + runs-on: ubuntu-latest |
| 87 | + |
| 88 | + steps: |
| 89 | + - name: Checkout |
| 90 | + uses: actions/checkout@v2 |
| 91 | + - name: Install Python |
| 92 | + uses: actions/setup-python@v2 |
| 93 | + with: |
| 94 | + python-version: '3.8' |
| 95 | + architecture: 'x64' |
| 96 | + - uses: actions/download-artifact@v2 |
| 97 | + with: |
| 98 | + name: my_server_extension-sdist |
| 99 | + - name: Install and Test |
| 100 | + run: | |
| 101 | + pip install my_server_extension.tar.gz |
| 102 | + pip install jupyter_server |
| 103 | + jupyter server extension list 2>&1 | grep -ie "message_replay.*OK" |
0 commit comments