Skip to content

Commit

Permalink
Fix binder (#40)
Browse files Browse the repository at this point in the history
* Fix binder
Upgrade workflow actions

* Don't force Python version
  • Loading branch information
fcollonval authored Jul 26, 2023
1 parent 3221844 commit 1046c85
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 33 deletions.
23 changes: 5 additions & 18 deletions .github/workflows/binder-on-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,15 @@ on:
pull_request_target:
types: [opened]

permissions:
pull-requests: write


jobs:
binder:
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- name: comment on PR with Binder link
uses: actions/github-script@v3
- uses: jupyterlab/maintainer-tools/.github/actions/binder-link@v1
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
var PR_HEAD_USERREPO = process.env.PR_HEAD_USERREPO;
var PR_HEAD_REF = process.env.PR_HEAD_REF;
github.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: `[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/${PR_HEAD_USERREPO}/${PR_HEAD_REF}?urlpath=lab/tree/examples/README.ipynb) :point_left: Launch a Binder on branch _${PR_HEAD_USERREPO}/${PR_HEAD_REF}_`
})
env:
PR_HEAD_REF: ${{ github.event.pull_request.head.ref }}
PR_HEAD_USERREPO: ${{ github.event.pull_request.head.repo.full_name }}

github_token: ${{ secrets.github_token }}

20 changes: 10 additions & 10 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Base Setup
uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
Expand Down Expand Up @@ -49,7 +49,7 @@ jobs:
pip uninstall -y "jupyterlab_rise" jupyterlab
- name: Upload extension packages
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: extension-artifacts
path: dist/jupyterlab_rise*
Expand All @@ -61,13 +61,13 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Install Python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: '3.9'
architecture: 'x64'
- uses: actions/download-artifact@v2
- uses: actions/download-artifact@v3
with:
name: extension-artifacts
- name: Install and Test
Expand Down Expand Up @@ -96,13 +96,13 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Base Setup
uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1

- name: Download extension package
uses: actions/download-artifact@v2
uses: actions/download-artifact@v3
with:
name: extension-artifacts

Expand All @@ -118,7 +118,7 @@ jobs:
run: jlpm install

- name: Set up browser cache
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: |
${{ github.workspace }}/pw-browsers
Expand All @@ -135,7 +135,7 @@ jobs:
- name: Upload Playwright Test report
if: always()
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: jupyterlab_rise-playwright-tests
path: |
Expand All @@ -147,7 +147,7 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
- uses: jupyterlab/maintainer-tools/.github/actions/check-links@v1
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/check-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Base Setup
uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
- name: Install Dependencies
Expand All @@ -23,7 +23,7 @@ jobs:
token: ${{ secrets.GITHUB_TOKEN }}

- name: Upload Distributions
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: jupyterlab_rise-releaser-dist-${{ github.run_number }}
path: .jupyter_releaser_checkout/dist
2 changes: 1 addition & 1 deletion .github/workflows/update-integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}

Expand Down
3 changes: 1 addition & 2 deletions binder/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,9 @@ channels:

dependencies:
# runtime dependencies
- python >=3.8,<3.9.0a0
- jupyterlab >=3,<4.0.0a0
# labextension build dependencies
- nodejs >=14,<15
- nodejs >=18,<19
- pip
- wheel
# additional packages for demos
Expand Down

0 comments on commit 1046c85

Please sign in to comment.