Build #184
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build | |
| on: | |
| push: | |
| branches: ["main"] | |
| pull_request: | |
| schedule: | |
| - cron: "0 0 * * *" | |
| defaults: | |
| run: | |
| shell: bash -eux {0} | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, macos-latest, windows-latest] | |
| python-version: ['3.9', '3.10', '3.11'] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v2 | |
| - name: Base Setup | |
| uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1 | |
| - name: Install dependencies | |
| run: python -m pip install -U jupyter_server | |
| - name: Build the extension | |
| run: | | |
| python -m pip install . | |
| jupyter server extension enable jupyter_ai_tools | |
| jupyter server extension list 2>&1 | grep -ie "jupyter_ai_tools.*OK" | |
| pip install build | |
| python -m build --sdist | |
| # ✅ Save the artifact before uninstalling | |
| cp dist/*.tar.gz my_server_extension.tar.gz | |
| # Optional cleanup | |
| pip uninstall -y "jupyter_ai_tools" jupyter_server | |
| rm -rf "jupyter_ai_tools" | |
| - name: Upload artifact | |
| if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.9' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: my_server_extension-sdist | |
| path: my_server_extension.tar.gz | |
| check_links: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1 | |
| - uses: jupyterlab/maintainer-tools/.github/actions/check-links@v1 | |
| test_lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1 | |
| - name: Install lint + test dependencies | |
| run: pip install -e ".[lint,test]" | |
| - name: Run Linters | |
| run: bash ./.github/workflows/lint.sh | |
| check_release: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: Base Setup | |
| uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1 | |
| - name: Install Dependencies | |
| run: pip install -e . | |
| - name: Check Release | |
| uses: jupyter-server/jupyter_releaser/.github/actions/check-release@v2 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Upload Distributions | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: jupyter_ai_tools-releaser-dist-${{ github.run_number }} | |
| path: .jupyter_releaser_checkout/dist | |
| test_sdist: | |
| needs: build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v2 | |
| - name: Install Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.9' | |
| architecture: 'x64' | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| name: my_server_extension-sdist | |
| - name: Install and Test | |
| run: | | |
| pip install my_server_extension.tar.gz | |
| pip install jupyter_server | |
| jupyter server extension list 2>&1 | grep -ie "jupyter_ai_tools.*OK" |