-
Notifications
You must be signed in to change notification settings - Fork 396
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Split workflows into logical steps and use nested workflow approach * General maintainence on workflows to work with new build organization and build system * Install kernel when quatro is installed. Seems like CI fails otherwise https://github.com/mahendrapaipuri/jupytext/actions/runs/6561210848/job/17820549979 * Add alls-green action to show CI results in more UI friendly way * Use optional uploading of build artifacts
- Loading branch information
1 parent
feb1974
commit 916e855
Showing
10 changed files
with
372 additions
and
190 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
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,62 @@ | ||
name: CI | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
upload-build-artifacts: | ||
type: boolean | ||
required: false | ||
default: false | ||
description: Upload build artifacts | ||
push: | ||
paths-ignore: | ||
- 'CHANGELOG.md' | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
schedule: | ||
- cron: '0 11 * * 4' | ||
|
||
permissions: | ||
# All nested workflows will inherit these permissions and so no need to declare | ||
# in each step file | ||
contents: read | ||
# Cannot use it in codeql nested workflow without declaring it on | ||
# top level workflow | ||
# Ref: https://docs.github.com/en/actions/using-workflows/reusing-workflows#access-and-permissions | ||
security-events: write | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
pre-commit: | ||
uses: ./.github/workflows/step_pre-commit.yml | ||
|
||
codeql: | ||
needs: [ pre-commit ] | ||
uses: ./.github/workflows/step_static-analysis.yml | ||
|
||
test-pip: | ||
needs: [ codeql ] | ||
uses: ./.github/workflows/step_tests-pip.yml | ||
|
||
test-conda: | ||
needs: [ codeql ] | ||
uses: ./.github/workflows/step_tests-conda.yml | ||
|
||
build: | ||
needs: [ test-pip, test-conda ] | ||
uses: ./.github/workflows/step_build.yml | ||
with: | ||
upload: ${{ inputs.upload-build-artifacts || false }} | ||
|
||
pass: | ||
needs: [ build ] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check jobs | ||
uses: re-actors/alls-green@release/v1 | ||
with: | ||
jobs: ${{ toJSON(needs) }} | ||
if: always() |
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
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,58 @@ | ||
name: build | ||
run-name: Build test | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
upload: | ||
type: boolean | ||
required: false | ||
default: false | ||
description: Upload build artifacts | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }}-build | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout source | ||
uses: actions/checkout@v3 | ||
|
||
- name: Base Setup | ||
uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1 | ||
|
||
- name: Build package | ||
run: | | ||
python -m pip install build wheel | ||
# NOTE: These builds and verifications of the builds can be done more | ||
# robustily with jupyter-releaser. | ||
# | ||
# Removed the check on size of package as we are distributing tests/ with | ||
# sdist now and they are around 8MB. Seems like original check was to make | ||
# sure we are not distributing node_modules and we are quite safe with that | ||
# with hatch build system. | ||
# | ||
# Build jupytext package | ||
python -m build | ||
# Build lab extension(s) | ||
npm pack --pack-destination dist jupyterlab/packages/* | ||
# Check that the lab is there | ||
if (($(tar -tf dist/*.tar.gz | grep jupyterlab/jupyterlab_jupytext/labextension/package.json$ | wc -l)==0)); then echo "Missing jupyterlab_jupytext" && exit 1; fi | ||
# Install package and extension | ||
python -m pip install dist/*.tar.gz | ||
echo "Install went OK" | ||
- name: Archive build artifacts | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: dist | ||
path: dist | ||
if: ${{ inputs.upload }} |
Oops, something went wrong.