-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/main'
# Conflicts: # yarn.lock
- Loading branch information
Showing
103 changed files
with
14,909 additions
and
11,123 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: MAIN | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- release-* | ||
release: | ||
types: | ||
- published | ||
|
||
jobs: | ||
init: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 2 | ||
|
||
# ON CHANGED FILES | ||
build_labextension: | ||
uses: ./.github/workflows/build.yml | ||
needs: init | ||
|
||
dockerize_labextension: | ||
needs: build_labextension | ||
uses: ./.github/workflows/docker.yml | ||
secrets: inherit | ||
|
||
|
||
release_labextension: | ||
needs: build_labextension | ||
if: startsWith(github.event.release.tag_name, 'grader-labextension') | ||
uses: ./.github/workflows/publish_labextension.yml | ||
secrets: inherit |
This file was deleted.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,156 +1,47 @@ | ||
name: Build | ||
# This workflow will upload a Python Package using Twine when a release is created | ||
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries | ||
|
||
on: | ||
push: | ||
branches: main | ||
pull_request: | ||
branches: '*' | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Base Setup | ||
uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1 | ||
|
||
- name: Install dependencies | ||
run: python -m pip install -U "jupyterlab>=4.0.0,<5" | ||
|
||
- name: Lint the extension | ||
run: | | ||
set -eux | ||
jlpm | ||
jlpm run lint:check | ||
- name: Test the extension | ||
run: | | ||
set -eux | ||
jlpm run test | ||
- name: Build the extension | ||
run: | | ||
set -eux | ||
python -m pip install .[test] | ||
pytest -vv -r ap --cov grader_labextension | ||
jupyter server extension list | ||
jupyter server extension list 2>&1 | grep -ie "grader_labextension.*OK" | ||
jupyter labextension list | ||
jupyter labextension list 2>&1 | grep -ie "grader-labextension.*OK" | ||
python -m jupyterlab.browser_check | ||
- name: Package the extension | ||
run: | | ||
set -eux | ||
pip install build | ||
python -m build | ||
pip uninstall -y "grader_labextension" jupyterlab | ||
- name: Upload extension packages | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: extension-artifacts | ||
path: dist/grader_labextension* | ||
if-no-files-found: error | ||
# This workflow uses actions that are not certified by GitHub. | ||
# They are provided by a third-party and are governed by | ||
# separate terms of service, privacy policy, and support | ||
# documentation. | ||
|
||
test_isolated: | ||
needs: build | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Install Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.9' | ||
architecture: 'x64' | ||
- uses: actions/download-artifact@v3 | ||
with: | ||
name: extension-artifacts | ||
- name: Install and Test | ||
run: | | ||
set -eux | ||
# Remove NodeJS, twice to take care of system and locally installed node versions. | ||
sudo rm -rf $(which node) | ||
sudo rm -rf $(which node) | ||
name: Build Labextension | ||
|
||
pip install "jupyterlab>=4.0.0,<5" grader_labextension*.whl | ||
jupyter server extension list | ||
jupyter server extension list 2>&1 | grep -ie "grader_labextension.*OK" | ||
on: | ||
workflow_call: | ||
|
||
jupyter labextension list | ||
jupyter labextension list 2>&1 | grep -ie "grader-labextension.*OK" | ||
python -m jupyterlab.browser_check --no-browser-test | ||
permissions: | ||
contents: read | ||
|
||
integration-tests: | ||
name: Integration tests | ||
needs: build | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
env: | ||
PLAYWRIGHT_BROWSERS_PATH: ${{ github.workspace }}/pw-browsers | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Base Setup | ||
uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1 | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Download extension package | ||
uses: actions/download-artifact@v3 | ||
- name: Setup node | ||
uses: actions/setup-node@v1 | ||
with: | ||
name: extension-artifacts | ||
|
||
- name: Install the extension | ||
run: | | ||
set -eux | ||
python -m pip install "jupyterlab>=4.0.0,<5" grader_labextension*.whl | ||
- name: Install dependencies | ||
working-directory: ui-tests | ||
env: | ||
YARN_ENABLE_IMMUTABLE_INSTALLS: 0 | ||
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1 | ||
run: jlpm install | ||
|
||
- name: Set up browser cache | ||
uses: actions/cache@v3 | ||
node-version: '16.x' | ||
- name: Set up Python | ||
uses: actions/setup-python@v3 | ||
with: | ||
path: | | ||
${{ github.workspace }}/pw-browsers | ||
key: ${{ runner.os }}-${{ hashFiles('ui-tests/yarn.lock') }} | ||
|
||
- name: Install browser | ||
run: jlpm playwright install chromium | ||
working-directory: ui-tests | ||
|
||
- name: Execute integration tests | ||
working-directory: ui-tests | ||
python-version: '3.10' | ||
- name: Install build dependencies | ||
run: | | ||
jlpm playwright test | ||
python -m pip install --upgrade pip | ||
pip install build wheel twine hatch jupyter_packaging packaging setuptools hatch-nodejs-version hatch-jupyter-builder | ||
- name: Build package | ||
run: python -m build | ||
|
||
- name: Upload Playwright Test report | ||
if: always() | ||
# Upload Artifacts | ||
- name: Archive labextension artifacts | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: grader_labextension-playwright-tests | ||
name: dist-labextension | ||
retention-days: 1 | ||
path: | | ||
ui-tests/test-results | ||
ui-tests/playwright-report | ||
check_links: | ||
name: Check Links | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 15 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1 | ||
- uses: jupyterlab/maintainer-tools/.github/actions/check-links@v1 | ||
./dist | ||
!./dist/**/*.md |
This file was deleted.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
name: Create and publish a Docker image | ||
|
||
on: | ||
workflow_call: | ||
|
||
env: | ||
REGISTRY: ghcr.io | ||
IMAGE_NAME: ${{ github.repository }} | ||
|
||
jobs: | ||
build-and-push-image: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
packages: write | ||
|
||
steps: | ||
|
||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
- name: Log in to the Container registry | ||
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9 | ||
with: | ||
registry: ${{ env.REGISTRY }} | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Extract metadata (tags, labels) for Docker | ||
id: meta | ||
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38 | ||
with: | ||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} | ||
tags: | | ||
type=ref,event=branch | ||
type=ref,event=tag | ||
type=ref,event=pr | ||
type=match,pattern=\d.\d.\d.* | ||
type=sha | ||
- name: Build and push Docker image | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: . | ||
file: ./Dockerfile | ||
platforms: linux/amd64,linux/arm64 | ||
push: true | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.