Skip to content

Commit

Permalink
Merge pull request #43 from kedro-org/noklam/create-ci-to-install-dep…
Browse files Browse the repository at this point in the history
…endencies-42

Noklam/create ci to install dependencies 42
  • Loading branch information
noklam authored Jul 3, 2024
2 parents 93eb4fe + 8001e88 commit 36540f6
Show file tree
Hide file tree
Showing 5 changed files with 82 additions and 3 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/installation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Install development dependencies

on:
workflow_call:
inputs:
os:
type: string
python-version:
type: string
branch:
type: string
default: ''
jobs:
install:
runs-on: [ubuntu-latest]
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ inputs.branch }}
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.10"

# - name: Add MSBuild to PATH
# if: inputs.os == 'windows-latest'
# uses: microsoft/setup-msbuild@v2
- name: Install dependencies
run: |
make dev-install
- name: pip freeze
run: uv pip freeze --system
- name: Run unit tests
run: make test
33 changes: 33 additions & 0 deletions .github/workflows/nightly-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Run nightly job on vscode-kedro

on:
workflow_dispatch:
schedule:
# Run every day at midnight (UTC time)
- cron: '0 0 * * *'

jobs:
nightly-main:
uses: ./.github/workflows/installation.yml
with:
branch: main



notify-main:
permissions:
issues: write
name: Notify failed build for nightly-main
needs: nightly-main
if: ${{ !success() }}
runs-on: ubuntu-latest
steps:
- uses: jayqi/failed-build-issue-action@v1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
label-name: "main nightly build"
title-template: "ci: Nightly build failure on `main`"
body-template: |
GitHub Actions workflow [{{workflow}} #{{runNumber}}](https://github.com/{{repo.owner}}/{{repo.repo}}/actions/runs/{{runId}}) failed.
create-label: true
always-create-new-issue: false
6 changes: 5 additions & 1 deletion DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,15 @@


# Dev Setup
1. `npm install`
1. `make dev-install`
2. `pip install -r requirements.txt` in `vscode-kedro`
3. `pip install -r requirements.txt` in the test project (to make sure you can do `kedro run`)
4. `make sign-off` to make sure the DCO will pass.

`make dev-install` installs a few different things:
- `npm install` for the VSCode frontend
- `pip isntall -r dev-requirements.txt` for the Python backend
- `nox --sesssion build_pakcage` for building `bundled/libs` locally

# Debug
You can start debug with `F5`, this should lauch an "Extension Development Host". If it doesn't check if there is a process stuck in the terminal, try to hit `Cmd + C` or `Ctrl + C` to terminate the `npm watch` process.
Expand Down
9 changes: 8 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,11 @@ sign-off:


build:
vsce package
vsce package


dev-install:
npm install
pip install -r dev-requirements.txt
nox --session build_package

2 changes: 1 addition & 1 deletion noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ def lint(session: nox.Session) -> None:
@nox.session()
def build_package(session: nox.Session) -> None:
"""Builds VSIX package for publishing."""
_check_files(["README.md", "LICENSE", "SECURITY.md", "SUPPORT.md"])
_check_files(["README.md", "LICENSE", "SUPPORT.md"])
_setup_template_environment(session)
session.run("npm", "install", external=True)
session.run("npm", "run", "vsce-package", external=True)
Expand Down

0 comments on commit 36540f6

Please sign in to comment.